mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Orphan handling in _old_access.py
This commit is contained in:
@@ -656,7 +656,7 @@ class TeamAccess(BaseAccess):
|
|||||||
raise PermissionDenied('Unable to change organization on a team')
|
raise PermissionDenied('Unable to change organization on a team')
|
||||||
if self.user.is_superuser:
|
if self.user.is_superuser:
|
||||||
return True
|
return True
|
||||||
if self.user in obj.organization.deprecated_admins.all():
|
if obj.organization and self.user in obj.organization.deprecated_admins.all():
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user