move logic for project udpate to access.py

This commit is contained in:
AlanCoding
2016-06-20 11:35:07 -04:00
parent d182280ff7
commit 8fd18b882a
2 changed files with 6 additions and 17 deletions

View File

@@ -709,8 +709,9 @@ class ProjectAccess(BaseAccess):
def can_delete(self, obj):
return self.can_change(obj, None)
@check_superuser
def can_start(self, obj):
return self.can_change(obj, {}) and obj.can_update
return obj and self.user in obj.update_role
class ProjectUpdateAccess(BaseAccess):
'''