Warn user that migrating with "Default project creation protection" set to "No one" will not migrate projects
Problem
The problem has been described by a user here.
When importing from SM instance, if that SM source instance has Default project creation protection set to No one (feature docs) importing projects fails completely. The error that caused projects imports to fail is not readily available to user in UI. It can be extracted from logs, (User is not allowed to import projects
), however it doesn't point to what has caused this error and how to fix it.
User used direct transfer, but also file-based Import/Export and any other importer that GitLab offers starts be creating project.
Proposed solution
For direct transfer
When an instance has Default project creation protection set to No one in UI the "Import without projects" option from the dropdown should be chosen by default and "Import with projects" dropdown option should be disabled.
Show a warning above the "Be aware of visibility rules when importing groups." warning saying:
"Project cannot be imported when on the source instance the Default project creation protection
is set to No one
. Instance Administrator needs to change this setting to allow for import of the projects."
When an instance has Default project creation protection set to No one the API for starting the new migration, unless entities[migrate_projects]
with false
is passed, should return a warning message first and give an option to the user to continue, knowing that the projects won't be imported, or abort, so that they can change the settings first.
Add this information to user docs in Prerequisites section.
This permission should be checked for direct transfer, project import/export and other importers, as they all start with creating a blank project to import the data into, so it's crucial we have this setting enabled in order for importers to function.
This can become an epic, to cover all importers.
I don't see group creation permission setting in docs, but it should be double checked if it exists.