mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
Show inventory source POST in OPTIONS for inventory admins (#5076)
This commit is contained in:
parent
f4bc69d5f7
commit
15444bef70
@ -1038,7 +1038,7 @@ class InventorySourceAccess(NotificationAttachMixin, BaseAccess):
|
||||
|
||||
def can_add(self, data):
|
||||
if not data or 'inventory' not in data:
|
||||
return Organization.accessible_objects(self.user, 'admin_role').exists()
|
||||
return Inventory.accessible_objects(self.user, 'admin_role').exists()
|
||||
|
||||
if not self.check_related('source_project', Project, data, role_field='use_role'):
|
||||
return False
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user