mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 02:17:37 -02: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')
|
project = get_value(Project, 'project')
|
||||||
if 'job_type' in data and data['job_type'] == PERM_INVENTORY_SCAN:
|
if 'job_type' in data and data['job_type'] == PERM_INVENTORY_SCAN:
|
||||||
if inventory:
|
if inventory:
|
||||||
org = inventory.organization
|
accessible = self.user in inventory.use_role
|
||||||
accessible = self.user in org.admin_role
|
|
||||||
else:
|
else:
|
||||||
accessible = False
|
accessible = False
|
||||||
if not project and accessible:
|
if not project and accessible:
|
||||||
|
|||||||
Reference in New Issue
Block a user