Create members for reassigned users in Direct Transfer
What does this MR do and why?
This changes updates Direct Transfer to create members for users who have already accepted the reassignment. Besides, it uses the MembersPipeline to create Import::SourceUser and placeholder users for every user that is a member of the source entity.
Such change is behind the feature flags: importer_user_mapping
and bulk_import_importer_user_mapping
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.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Enable the feature flags
bulk_import_importer_user_mapping
andimporter_user_mapping
- Import a group using Direct Transfer
- Go to new group
- Import group
- Provide the source instance URL and access token
- Select a group to migrate. Make sure the group has a couple of members
- Wait for the migration to finish
- Check the members' page of the migrated group and project. Only the user that triggered the migration should be a member.
- Access the list of Import::SourceUsers/Placeholder users of the top-level namespace where the group was migrated
- Go to the top-level namespace
- Click on the menu item Members in the sidebar
- Click on the tab Placeholder Users
- Check if an Import::SourceUsers/Placeholder user was created for each member in the source instance.
- Reassign a placeholder user to a real user
- Select a user in the dropdown
- Press the reassign button
- Login as the selected user
- Open Letter Opener - http://gdk.test:3000/rails/letter_opener
- Search for the reassignment email and follow the steps to accept the reassignment
- Trigger another migration and check if, this time, a membership was created for the user who accepted the reassignment.
Edited by Rodrigo Tomonari