[go: up one dir, main page]

Allow placeholder reassignment to blocked users

What does this MR do and why?

Updated Import::SourceUsers::ReassignService to allow placeholder users to be reassigned to inactive users if the allow_bypass_placeholder_confirmation application setting 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 customers to reassign inactive users so that the original user owns their contributions after import, regardless of their state. This MR does not bypass the reassigned user confirmation, so it's not yet possible to complete reassignment to an inactive user without the Rails console.

This MR also updates the variables passed to the users search query so that inactive users are shown in the dropdown when the setting is enabled.

Reassignment event metrics were also updated to include the state of the reassigned user so that we have metrics on how often inactive users are reassigned.

References

  • Mini epic to bypass reassigned user confirmation via an application setting: &17382 (closed)

Screenshots or screen recordings

Attempting to reassign a blocked user, France Bartoletti:

image

Before After
image With setting enabled, logged in as an admin, and feature flag enabled image
With setting disabled, logged in as group owner but not admin, or feature flag disabled: image

How to set up and validate locally

  1. Enable importer_user_mapping_allow_bypass_of_confirmation feature flag
  2. Log into your local instance as an admin
  3. Enable the allow_bypass_placeholder_confirmation application setting
  4. Ensure you have at least one blocked user.
  5. 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.
  6. On an unassigned placeholder user, open the user select dropdown and search for a blocked user.
  7. The blocked user should be visible, and selecting and reassigning it should put the placeholder into the "pending approval" state

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 #523260 (closed)

Edited by Sam Word

Merge request reports

Loading