1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

Merge pull request #2001 from AlanCoding/1998_inv_prompted_jt

All non-superusers to create prompted JTs
This commit is contained in:
Akita Noek 2016-05-20 15:52:41 -04:00
commit a276b9271d

View File

@ -772,7 +772,7 @@ class JobTemplateAccess(BaseAccess):
# Check that the given inventory ID is valid.
inventory_pk = get_pk_from_dict(data, 'inventory')
inventory = Inventory.objects.filter(id=inventory_pk)
if not inventory.exists():
if not inventory.exists() and not data.get('ask_inventory_on_launch', False):
return False # Does this make sense? Maybe should check read access
project_pk = get_pk_from_dict(data, 'project')