mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Implements issue #1061, allow org admins (or higher) job delete
This commit is contained in:
parent
3a11bca31f
commit
b5ca6b891b
@ -883,7 +883,10 @@ class JobAccess(BaseAccess):
|
||||
return obj.status == 'new' and self.can_read(obj) and self.can_add(data)
|
||||
|
||||
def can_delete(self, obj):
|
||||
return self.can_read(obj)
|
||||
# Allow org admins and superusers to delete jobs
|
||||
if self.user.is_superuser:
|
||||
return True
|
||||
return obj.inventory.accessible_by(self.user, ALL_PERMISSIONS)
|
||||
|
||||
def can_start(self, obj):
|
||||
self.check_license()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user