Commit 043d748b by Tom Christie

Tweak

parent a574dc7f
...@@ -153,7 +153,7 @@ class TokenHasReadWriteScope(BasePermission): ...@@ -153,7 +153,7 @@ class TokenHasReadWriteScope(BasePermission):
elif hasattr(token, 'scope'): # OAuth 2 elif hasattr(token, 'scope'): # OAuth 2
required = oauth2_constants.READ if read_only else oauth2_constants.WRITE required = oauth2_constants.READ if read_only else oauth2_constants.WRITE
return oauth2_provider_scope.check(required, request.auth.scope) return oauth2_provider_scope.check(required, request.auth.scope)
else:
assert False, ('TokenHasReadWriteScope requires either the' assert False, ('TokenHasReadWriteScope requires either the'
'`OAuthAuthentication` or `OAuth2Authentication` authentication ' '`OAuthAuthentication` or `OAuth2Authentication` authentication '
'class to be used.') 'class to be used.')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment