[go: up one dir, main page]

Skip to content

Allow Admin to reassign user contributions and memberships from placeholders to blocked users

Problem

A Premium SM customer feedback that they keep blocked users, to keep information on both their contributions and memberships.

Currently it's not possible to reassign contributions from placeholder to a blocked user. Keeping placeholder and placeholder keeps the contribution information, but doesn't show membership information.

This issue is to consider if allowing Admin user to re-assign user contributions and memberships from placeholders to blocked users is a feasible and secure option or not.

Proposed solution

This feature depends on Allow Admin to re-assign contributions from pla... (#523259 - closed).

There will be a single application setting for this issue and Allow Admin to re-assign contributions from pla... (#523259 - closed), so, when the setting is enabled, administrators can bypass the reassignment confirmation and also reassign to blocked users.

This feature is thought to be only for SM and Dedicated instances. If we wanted to have it for .com, we would need to reevaluate and include Enterprise users feature or other mechanism.

Proposed technical implementation

  • Add an application setting to allow both reassigning to blocked users (this issue) and Allow Admin to re-assign contributions from pla... (#523259 - closed).
  • Update the reassign service to allow users in active or blocked state if current_user is an admin and the setting is turned on. The invalid assignee message needs to be updated as well.
  • Update placeholder actions dropdown on the frontend to query for active and blocked users if the user is an admin and the setting is turned on.

For metrics

Add an additional property to our event tracking that shows the reassign_to_user_state e.g. "active", "blocked", "banned". This can be derived from import_source_user.placeholder_user.state:

...
  additional_properties: {
    label: Gitlab::GlobalAnonymousId.user_id(import_source_user.placeholder_user),
    property: Gitlab::GlobalAnonymousId.user_id(reassign_to_user),
    import_type: import_source_user.import_type,
    reassign_to_user_state: import_source_user.placeholder_user.state
  }
Edited by Sam Word