mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 18:37:36 -02:30
Show inventory source POST in OPTIONS for inventory admins (#5076)
This commit is contained in:
committed by
Shane McDonald
parent
f4bc69d5f7
commit
15444bef70
@@ -1038,7 +1038,7 @@ class InventorySourceAccess(NotificationAttachMixin, BaseAccess):
|
|||||||
|
|
||||||
def can_add(self, data):
|
def can_add(self, data):
|
||||||
if not data or 'inventory' not in 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'):
|
if not self.check_related('source_project', Project, data, role_field='use_role'):
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user