"[EPIC] Report option on everything - reports models

This commit is contained in:
Eliot Berriot 2019-08-22 11:30:30 +02:00
parent 079671ef7a
commit a6cf2ce019
22 changed files with 792 additions and 21 deletions

View file

@ -96,8 +96,9 @@ class ScopePermission(permissions.BasePermission):
):
return False
# we use default anonymous scopes
user_scopes = scopes.ANONYMOUS_SCOPES
user_scopes = (
getattr(view, "anonymous_scopes", set()) | scopes.ANONYMOUS_SCOPES
)
return should_allow(
required_scope=required_scope, request_scopes=user_scopes
)