Allow importing direct memberships of same level as an existing inherited one
What does this MR do and why?
Previously we would skip creating a direct membership if there was an existing inherited membership of the same level for the user.
However, it's possible to create this scenario in GitLab and so we should allow importing it.
https://gitlab.com/gitlab-org/manage/import-and-integrate/discussions/-/issues/116#note_2131709670
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- After checking out this branch, restart Sidekiq:
gdk restart rails-background-jobs
. - Go to http://gdk.test:3000/rails/features/ and enable
importer_user_mapping
andbulk_import_importer_user_mapping
feature flags. - Choose a group with a project. In the group give a user Owner permissions. In the project, give the user Owner permissions also.
- Import the group using Direct Transfer (from your localhost to your localhost)
- Reassign the contributions of the member, accept them.
- Verify that the membership was imported
Edited by Luke Duncalfe