From 15444bef70f8a6b3ba3de152c718c148ed6153f6 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Wed, 16 Jun 2021 15:13:14 -0400 Subject: [PATCH] Show inventory source POST in OPTIONS for inventory admins (#5076) --- awx/main/access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/access.py b/awx/main/access.py index b9a2dfa3da..2e91de385b 100644 --- a/awx/main/access.py +++ b/awx/main/access.py @@ -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