Add configurable option to restrict what non-member users show in auto-complete fields
Release notes
A new group-level setting has been added to allow group owners to restrict which members can be invited to the group, subgroup, or applicable projects when using the 'autocomplete' field when inviting new members.
Problem to solve
A customer has recently contacted Support in this ticket to indicate a behaviour they sometimes encounter when inviting users to a project.
As shown in the GIF below, when entering an email address, such as rod@example.co, if you press 'Enter' fast enough, the auto-complete search doesn't show up but selects the first suitable match (which may have previously been shown in the results). In this case, this displays a user with the username of rod. This selected user is not an existing member of the group, but does have a public profile on GitLab.com: https://gitlab.com/Rod. The intended behaviour is to receive a prompt to invite via email, but the user navigated too quickly for this to appear. This can be a problem on large 'open' instances such as GitLab.com, where users separate to the organisation will exist.
The intention of this feature request is to put a limit on the auto-complete search on what users it can search for. For example, this should be limited to:
- Only existing members of the top-level group (or applicable subgroups/projects) can be invited and will be populated in this field. This limits invitation access to users within the organisation.
- If no users match the criteria, the field should default to invite-via-email, rather than using the first matching auto-complete.
Intended users
Personas are described at https://about.gitlab.com/handbook/product/personas/
Proposal
Implement a group (or project) setting that enables a restriction of search parameters on the invite members auto-complete field.
