mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 04:31:21 -03:30
If you have use_role on an inventory, make it so you can use it in scan jobs
#3077
This commit is contained in:
parent
46998cdcfe
commit
5bce9ee215
@ -906,8 +906,7 @@ class JobTemplateAccess(BaseAccess):
|
||||
project = get_value(Project, 'project')
|
||||
if 'job_type' in data and data['job_type'] == PERM_INVENTORY_SCAN:
|
||||
if inventory:
|
||||
org = inventory.organization
|
||||
accessible = self.user in org.admin_role
|
||||
accessible = self.user in inventory.use_role
|
||||
else:
|
||||
accessible = False
|
||||
if not project and accessible:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user