Check can_update for ProjectAccess.can_start for superusers too

can_update is a special model getter that checks to see if the project
is in a valid state it looks like - so it's important to check this for
superusers too. The can_change check does the implicit is_superuser
check for us, so we don't need another expclit check here, just
can_start protection.
This commit is contained in:
Akita Noek 2016-05-02 15:56:05 -04:00
parent f6f555b185
commit e50f20eb69

View File

@ -679,7 +679,6 @@ 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