Placeholder user mapping: make restriction of placeholder user mapping to enterprise users an optional feature

Summary

This issue was created as an action coming out of the discussion in the following RFH https://gitlab.com/gitlab-com/request-for-help/-/work_items/4190#note_3130039146.

As part of an import which creates placeholder users, there is a current mandatory restriction which states:

If your top-level group has at least one enterprise user, you can reassign contributions only to enterprise users in your organization.

This means you cannot accidentally reassign to users outside your organization.

This restriction was implemented as part of #510673 (closed), however, it was implemented as a non-optional restriction which may have unintended side effects.

Current state and problem statement

Due to the above, if a top level group currently has a mixture of enterprise and non-enterprise users, it will not allow the mapping of placeholder users to non-enterprise users. This restriction applies even for privileged accounts (e.g. instance admins and top level group owners on gitlab.com).

This causes friction with migrations and prevents access to the placeholder mapping feature for legitimate use cases. For example, an organization might have both enterprise users and non-enterprises users where non-enterprises users are external vendors/contractors who contribute to projects.

Proposal

Enable the restriction to be applied as an optional feature by top level group owners. Will require further discussions to align on the workflow/UI of how this can be best implemented, if agreed.

See discussion in this thread, in particular the suggested UX requirements: #593295 (comment 3171572489).

Edited by 🤖 GitLab Bot 🤖