mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Ensure the admin_role can always add an inventory_source.
This commit is contained in:
parent
a183ed14f2
commit
c6925ca8b4
@ -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…
Reference in New Issue
Block a user