mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 19:21:06 -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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user