mirror of
https://github.com/ansible/awx.git
synced 2026-03-24 20:35:02 -02:30
Prohibit adding singleton permissions as child of team
This commit is contained in:
@@ -427,6 +427,9 @@ class Role(models.Model):
|
||||
def is_ancestor_of(self, role):
|
||||
return role.ancestors.filter(id=self.id).exists()
|
||||
|
||||
def is_singleton(self):
|
||||
return self.singleton_name in [ROLE_SINGLETON_SYSTEM_ADMINISTRATOR, ROLE_SINGLETON_SYSTEM_AUDITOR]
|
||||
|
||||
|
||||
class RoleAncestorEntry(models.Model):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user