Fix inventory update permission so update_role is enough to update

This commit is contained in:
Akita Noek
2016-06-30 14:58:44 -04:00
parent 5c5e495e1b
commit b21c7e1d15
2 changed files with 19 additions and 1 deletions
+6 -1
View File
@@ -524,7 +524,12 @@ class InventorySourceAccess(BaseAccess):
return False
def can_start(self, obj):
return self.can_change(obj, {}) and obj.can_update
if obj and obj.group:
return obj.can_update and self.user in obj.group.inventory.update_role
elif obj and obj.inventory:
return obj.can_update and self.user in obj.inventory.update_role
return False
class InventoryUpdateAccess(BaseAccess):
'''