Create project for user API ignores path parameter
Summary
Create project for user API ignores path
parameter. This is preventing a customer from creating projects with custom path for their users: https://gitlab.zendesk.com/agent/tickets/78356
Steps to reproduce
- Call the Create project for user API with params
name=testname
andpath=testpath
:
curl --request POST --data "name=testname&path=testpath" --header "PRIVATE-TOKEN: <private_token>" http://<gitlab_external_url>/api/v4/projects/user/<user_id>
- Check and confirm that project for
user_id
has been created with nametestname
and pathtestname
. Value ofpath
param set totestpath
was ignored.
What is the current bug behavior?
path
parameter is ignored.
What is the expected correct behavior?
path
parameter should be honored when it's provided.
Possible fixes
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/projects.rb#L130
Add declaration for optional path
parameter here.
Edited by Ghost User