Importing GitLab repository into group loses branch protections
Summary
When creating a project from a GitLab export in a group, branch protections are lost. Allowed to merge and Allowed to push show 1 group. However, when you open the drop-down, the group is not shown. This also prevents any member of the project or group, including Maintainers, to push or merge to the protected branch. You have to manually add a role/group/user in the project settings before they can merge or push to the protected branch. You are also unable to remove the 1 group from showing up in the drop-down.
In this case, the export was created in 10.8.4-ce and imported into 11.0.x-ee
Steps to reproduce
- Create an export from a project
- Import project into a group space
- Navigate to project settings -> repository and notices the protected branch permissions
- As a member of the group, try to push to merge to a protected branch
What is the current bug behavior?
Branch protection permissions are lost. The permissions on the imported project show 1 group, but you are unable to see what group it is and no one can push or merge
What is the expected correct behavior?
Branch protections should be preserved.
Relevant logs and/or screenshots
Customer ticket -> https://gitlab.zendesk.com/agent/tickets/99983 (internal use)
/cc @jeremy_
