Skip confirmation when "allow bypass of placeholder user confirmation" is enabled
What does this MR do and why?
This MR skips the "awaiting approval" step when a real user is assigned to a placeholder user when "allow bypass of placeholder user confirmation" is enabled on the instance, user impersonation is enabled, and the reassigning user is an admin. The importer_user_mapping_allow_bypass_of_confirmation
feature flag must also be enabled. This allows admins on self-managed instances to skip requiring their users to accept their reassignments individually if the administrators of the instance feel that this step is unnecessary.
It also adds a new tracking event, reassign_placeholder_user_without_confirmation
to track when reassignment without assignee confirmation happens.
This MR Does not include notifications to the reassigned user. Those updates will be done in #534334 (closed). Similarly, this MR does not include the popup on the frontend to warn the reassigning user that placeholders will be reassigned immediately. That will be done under #534331 (closed). Only the backend changes are included in this MR.
References
- [Admin bypass] Skip confirmation when "allow by... (#534648 - closed)
- Add setting to allow bypass of placeholder user... (&17382 - closed)
Screenshots or screen recordings
With bypass enabled
After clicking reassign: The placeholder status immediately moves to reassignment in progress:
Now under reassigned tab once reassignment process finished:
Contributions have been reassigned:
With bypass disabled
After clicking reassign: The placeholder status moves to pending approval as usual:
How to set up and validate locally
- Enable
importer_user_mapping_allow_bypass_of_confirmation
feature flag - Log into your local instance as an admin
- Enable the
allow_bypass_placeholder_confirmation
application setting. Make sure user impersonation is also enabled. - Go to the placeholders tab of the group members page for a group that has unassigned placeholder users. If you don't have any, perform an import with user contributions using any of the importers that support it.
- Reassign the placeholder user.
- The placeholder user should move to the "reassignment in process" state and the user's contributions should be reassigned.
- After a few moments, the user reassignment should move to "success" under the reassigned tab
When placeholder confirmation bypass is not enabled, the current user flow should be followed. I.e. the placeholder should move to "pending approval" state, receive a confirmation email, and only once confirmed should confirmations be reassigned.
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.
Related to #534648 (closed)