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