mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 20:30:46 -03:30
Orphan handling in _old_access.py
This commit is contained in:
parent
7b8c2f5b74
commit
bb14c9003d
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user