If you have use_role on an inventory, make it so you can use it in scan jobs

#3077
This commit is contained in:
Akita Noek 2016-07-21 17:22:11 -04:00
parent 46998cdcfe
commit 5bce9ee215

View File

@ -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: