developer user run into 404 when create project using group project template
Summary
When a developer in a group create a project outside the subgroup used for Custom group-level project templates, the project will be created successfully but the screen will show 404 page for developer.
Steps to reproduce
(How one can reproduce the issue - this is very important)
- Create a groupA
- Add userA to the group with
developer
permission - Create a subgroup1
- Create a subgroup2
- Create a project1 in the subgroup1 and create a file in the project1 as well
- In groupA go to Settings > General > Custom project templates > set groupA/subgroup1 as Custom project templates > Save changes
- Do the following as userA
- Go to groupA or subgroup2
- Click on New project > Choose from template > Group > project1 > Use template
- Type in a new project name > make sure project URL is in either groupA or groupA/subgroup2 but not groupA/subgroup1
- Click on Create project > Observe 404 page
- Go to the namespace where the new project was create and see the project was created successfully from the template
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
Project creation is successful but the 404 page is shown
What is the expected correct behavior?
Project is created and load the project page
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
GitLab.com, GitLab Enterprise Edition 12.6.0-pre fa093de6