mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 23:16:01 -03:30
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user