Allow URL import into groups when personal project creation disabled
What does this MR do and why?
Fixed a bug where importing projects via git URL into a group was forbidden for users who can't create personal projects but otherwise have permission to create projects in a group.
References
Resolves #597850
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
![]() |
|
![]() |
How to set up and validate locally
- Sign into your GitLab instance as an administrator.
- Navigate to the admin dashboard and find a user who is the owner of a group or one who can make groups.
- Select the user, edit the user, then disable personal project creation for that user (i.e. set "projects limit" to 0).
- Sign in as that user or impersonate them.
- Importing projects into their personal namespace should now be forbidden. Navigating to
/import/url/newshould return a not found error without anamespace_idparam. - Navigate to a group that they own or create a group.
- Import a project into that group and verify that it was imported as expected (
/import/url/new?namespace_id=:group_idloads and functions properly). - Verify that the user cannot import projects via URL on a namespace where they don't have at least a maintainer role. Users must be at least a maintainer to import projects from any importer.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Sam Word



