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
No known key found for this signature in database
GPG Key ID: 6F374AF6E9EB9374

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