diff --git a/api/funkwhale_api/users/oauth/permissions.py b/api/funkwhale_api/users/oauth/permissions.py index 63f339268..823188d7a 100644 --- a/api/funkwhale_api/users/oauth/permissions.py +++ b/api/funkwhale_api/users/oauth/permissions.py @@ -51,12 +51,7 @@ class ScopePermission(permissions.BasePermission): if request.method.lower() in ["options", "head"]: return True - try: - scope_config = getattr(view, "required_scope") - except AttributeError: - raise ImproperlyConfigured( - "ScopePermission requires the view to define the required_scope attribute" - ) + scope_config = getattr(view, "required_scope", "noopscope") anonymous_policy = getattr(view, "anonymous_policy", False) if anonymous_policy not in [True, False, "setting"]: raise ImproperlyConfigured(