mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -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:
parent
f6f555b185
commit
e50f20eb69
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user