mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-13 00:08:36 -05:00
Merge pull request #2562 from AlanCoding/2527_inv_update_access
Add can_delete to InventoryUpdateAccess
This commit is contained in:
@@ -547,6 +547,10 @@ class InventoryUpdateAccess(BaseAccess):
|
||||
def can_cancel(self, obj):
|
||||
return self.can_change(obj, {}) and obj.can_cancel
|
||||
|
||||
@check_superuser
|
||||
def can_delete(self, obj):
|
||||
return self.user in obj.inventory_source.inventory.admin_role
|
||||
|
||||
class CredentialAccess(BaseAccess):
|
||||
'''
|
||||
I can see credentials when:
|
||||
|
||||
Reference in New Issue
Block a user