Fixed server model, removed some auth decorators

This commit is contained in:
0mar
2021-04-15 16:34:46 +02:00
parent 92c044eb79
commit 7544965145
6 changed files with 46 additions and 104 deletions

View File

@@ -287,19 +287,6 @@ def authenticated_403(self):
raise web.HTTPError(403)
@auth_decorator
def admin_only(self):
"""Decorator for restricting access to admin users
Deprecated in favor of scopes.need_scope()
"""
user = self.current_user
app_log.warning(
"Admin decorator is deprecated and will be removed soon. Use scope-based decorator instead"
)
if user is None or not user.admin:
raise web.HTTPError(403)
@auth_decorator
def metrics_authentication(self):
"""Decorator for restricting access to metrics"""