Add exception to allow relaunching callback jobs

allows for execute_role level users to directly
relaunch callback-type jobs, even though limit
has changed from JT, it is a down-selection
This commit is contained in:
AlanCoding
2018-05-11 09:05:25 -04:00
parent 46add35f98
commit db6cc7c50b
5 changed files with 22 additions and 7 deletions

View File

@@ -1507,7 +1507,7 @@ class JobAccess(BaseAccess):
elif not jt_access:
return False
org_access = obj.inventory and self.user in obj.inventory.organization.inventory_admin_role
org_access = bool(obj.inventory) and self.user in obj.inventory.organization.inventory_admin_role
project_access = obj.project is None or self.user in obj.project.admin_role
credential_access = all([self.user in cred.use_role for cred in obj.credentials.all()])