mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Merge pull request #2851 from ryanpetrello/fix-2843
show custom_virtualenvs at /api/v2/config if you have Project/Org access
This commit is contained in:
@@ -442,9 +442,9 @@ class ApiV1ConfigView(APIView):
|
|||||||
data.update(dict(
|
data.update(dict(
|
||||||
project_base_dir = settings.PROJECTS_ROOT,
|
project_base_dir = settings.PROJECTS_ROOT,
|
||||||
project_local_paths = Project.get_local_path_choices(),
|
project_local_paths = Project.get_local_path_choices(),
|
||||||
|
custom_virtualenvs = get_custom_venv_choices()
|
||||||
))
|
))
|
||||||
|
elif JobTemplate.accessible_objects(request.user, 'admin_role').exists():
|
||||||
if JobTemplate.accessible_objects(request.user, 'admin_role').exists():
|
|
||||||
data['custom_virtualenvs'] = get_custom_venv_choices()
|
data['custom_virtualenvs'] = get_custom_venv_choices()
|
||||||
|
|
||||||
return Response(data)
|
return Response(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user