mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 17:51:06 -03:30
fix 403 bug using write PAT and view.always_allow_superuser=True
This commit is contained in:
@@ -103,8 +103,7 @@ class ModelAccessPermission(permissions.BasePermission):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
# Always allow superusers
|
# Always allow superusers
|
||||||
if getattr(view, 'always_allow_superuser', True) and request.user.is_superuser \
|
if getattr(view, 'always_allow_superuser', True) and request.user.is_superuser:
|
||||||
and not hasattr(request.user, 'oauth_scopes'):
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Check if view supports the request method before checking permission
|
# Check if view supports the request method before checking permission
|
||||||
|
|||||||
Reference in New Issue
Block a user