mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
Merge pull request #1436 from wwitzel3/rbac-bug-1421
superuser should be able to delete users without an org
This commit is contained in:
commit
93fd398793
@ -255,6 +255,8 @@ class UserAccess(BaseAccess):
|
||||
if obj.is_superuser and super_users.count() == 1:
|
||||
# cannot delete the last active superuser
|
||||
return False
|
||||
if self.user.is_superuser:
|
||||
return True
|
||||
return obj.accessible_by(self.user, {'delete': True})
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user