Merge pull request #2562 from AlanCoding/2527_inv_update_access

Add can_delete to InventoryUpdateAccess
This commit is contained in:
Alan Rominger
2016-06-22 16:47:29 -04:00
committed by GitHub
3 changed files with 24 additions and 1 deletions
+4
View File
@@ -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: