mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Explicit super user check for JT can_delete
This commit is contained in:
parent
62562afd0d
commit
c36080e149
@ -1005,7 +1005,7 @@ class JobTemplateAccess(BaseAccess):
|
||||
return True
|
||||
|
||||
def can_delete(self, obj):
|
||||
is_delete_allowed = self.user in obj.admin_role
|
||||
is_delete_allowed = self.user.is_superuser or self.user in obj.admin_role
|
||||
if not is_delete_allowed:
|
||||
return False
|
||||
active_jobs = [dict(type="job", id=o.id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user