From cffa3247629c584778878cca59a9f825bcce4704 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Wed, 15 Aug 2018 11:41:43 -0400 Subject: [PATCH] show custom_virtualenvs at /api/v2/config if you have Project/Org access see: https://github.com/ansible/tower/issues/2843 --- awx/api/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/api/views.py b/awx/api/views.py index 1692968c75..25e5a537d0 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -442,9 +442,9 @@ class ApiV1ConfigView(APIView): data.update(dict( project_base_dir = settings.PROJECTS_ROOT, project_local_paths = Project.get_local_path_choices(), + custom_virtualenvs = get_custom_venv_choices() )) - - if JobTemplate.accessible_objects(request.user, 'admin_role').exists(): + elif JobTemplate.accessible_objects(request.user, 'admin_role').exists(): data['custom_virtualenvs'] = get_custom_venv_choices() return Response(data)