mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
Merge pull request #6490 from wwitzel3/devel
Ensure the admin_role can always add an inventory_source.
This commit is contained in:
commit
18bdc51276
@ -804,7 +804,8 @@ class InventorySourceAccess(BaseAccess):
|
||||
|
||||
def can_add(self, data):
|
||||
if not data or 'inventory' not in data:
|
||||
return False
|
||||
return Organization.accessible_objects(self.user, 'admin_role').exists()
|
||||
|
||||
if not self.check_related('source_project', Project, data, role_field='use_role'):
|
||||
return False
|
||||
# Checks for admin or change permission on inventory.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user