(self, cls, args=(), librarians=False)
| 135 | raise web.notfound() |
| 136 | |
| 137 | def handle(self, cls, args=(), librarians=False): |
| 138 | # Use admin theme |
| 139 | context.cssfile = "admin" |
| 140 | |
| 141 | m = getattr(cls(), web.ctx.method, None) |
| 142 | if not m: |
| 143 | raise web.nomethod(cls=cls) |
| 144 | else: |
| 145 | if context.user and context.user.is_librarian() and web.ctx.path == "/admin/solr": |
| 146 | return m(*args) |
| 147 | if self.is_admin() or (librarians and context.user and context.user.is_super_librarian()): |
| 148 | return m(*args) |
| 149 | else: |
| 150 | return render.permission_denied(web.ctx.path, "Permission denied.") |
| 151 | |
| 152 | GET = POST = delegate |
| 153 |
no test coverage detected