1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03:00

Fix an issue with relaunching jobs

This commit is contained in:
Matthew Jones 2014-12-18 16:38:52 -05:00
parent cd486b6d9a
commit da658ee524

View File

@ -1137,7 +1137,8 @@ class JobAccess(BaseAccess):
has_perm = False
if obj.job_template is not None and self.user.can_access(JobTemplate, 'start', obj.job_template):
has_perm = True
dep_access = self.user.can_access(Inventory, 'read', obj.inventory) and \
self.user.can_access(Project, 'read', obj.project)
return self.can_read(obj) and dep_access and has_perm
def can_cancel(self, obj):