From df11a7fd3daee942fde0b9401ecdc8b0d557d252 Mon Sep 17 00:00:00 2001 From: Vismay Golwala Date: Wed, 20 Mar 2019 16:01:33 -0400 Subject: [PATCH] Project admin manual SCM Type creation bug fix There was a bug in tower where project admin was not allowed to create a project with manual SCM type. This was because, the project base dir was only set from `settings.PROJECTS_ROOT`, if the user role was either admin or auditor. This has been updated by also allowing it to set when user is a project admin. Signed-off-by: Vismay Golwala --- awx/api/views/root.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/api/views/root.py b/awx/api/views/root.py index c7ecbbeef5..f7959d67a2 100644 --- a/awx/api/views/root.py +++ b/awx/api/views/root.py @@ -220,7 +220,8 @@ class ApiV1ConfigView(APIView): if request.user.is_superuser \ or request.user.is_system_auditor \ or Organization.accessible_objects(request.user, 'admin_role').exists() \ - or Organization.accessible_objects(request.user, 'auditor_role').exists(): + or Organization.accessible_objects(request.user, 'auditor_role').exists() \ + or Organization.accessible_objects(request.user, 'project_admin_role').exists(): data.update(dict( project_base_dir = settings.PROJECTS_ROOT, project_local_paths = Project.get_local_path_choices(),