mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 10:11:05 -03: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')
|
||||
if self.user.is_superuser:
|
||||
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 False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user