mirror of
https://github.com/ansible/awx.git
synced 2026-06-25 00:18:07 -02:30
Prevent system auditor from downloading install bundle (#6805)
This commit is contained in:
@@ -234,6 +234,13 @@ class UserPermission(ModelAccessPermission):
|
||||
raise PermissionDenied()
|
||||
|
||||
|
||||
class IsSystemAdmin(permissions.BasePermission):
|
||||
def has_permission(self, request, view):
|
||||
if not (request.user and request.user.is_authenticated):
|
||||
return False
|
||||
return request.user.is_superuser
|
||||
|
||||
|
||||
class IsSystemAdminOrAuditor(permissions.BasePermission):
|
||||
"""
|
||||
Allows write access only to system admin users.
|
||||
|
||||
Reference in New Issue
Block a user