mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 11:27:36 -02:30
superuser should be able to delete users without an org
This commit is contained in:
@@ -255,6 +255,8 @@ class UserAccess(BaseAccess):
|
|||||||
if obj.is_superuser and super_users.count() == 1:
|
if obj.is_superuser and super_users.count() == 1:
|
||||||
# cannot delete the last active superuser
|
# cannot delete the last active superuser
|
||||||
return False
|
return False
|
||||||
|
if self.user.is_superuser:
|
||||||
|
return True
|
||||||
return obj.accessible_by(self.user, {'delete': True})
|
return obj.accessible_by(self.user, {'delete': True})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user