Show inventory source POST in OPTIONS for inventory admins (#5076)

This commit is contained in:
Alan Rominger
2021-06-16 15:13:14 -04:00
committed by Shane McDonald
parent f4bc69d5f7
commit 15444bef70

View File

@@ -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