mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 10:11:05 -03:30
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 <vgolwala@redhat.com>
This commit is contained in:
@@ -220,7 +220,8 @@ class ApiV1ConfigView(APIView):
|
|||||||
if request.user.is_superuser \
|
if request.user.is_superuser \
|
||||||
or request.user.is_system_auditor \
|
or request.user.is_system_auditor \
|
||||||
or Organization.accessible_objects(request.user, 'admin_role').exists() \
|
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(
|
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(),
|
||||||
|
|||||||
Reference in New Issue
Block a user