Allow whitelisting for "external collaborator by default" setting
What does this MR do?
We would like to extend the "add new users as external by default" function with a new input field "add as internal collaborators" which is a text input field, allowing to pass a regular expression, which adds all matching email addresses as internal collaborators rather than external collaborators.
added to UI in admin/users/new and create user by API.
Are there points in the code the reviewer needs to double check?
Validation of regex in admin/application_settings/ form
Why was this MR needed?
GitLab allows to treat all new users as external collaborators when using the "add new users as external collaborators" settings in the admin panel. Such external collaborator don't have access to internal projects. Converting a user from external to internal has to be done manually or by utilizing the API.
However, adding all new users as external collaborators and only allow certain people internal access (e.g. employees) based on certain criteria (e.g. email address) is a quiet common use case.
Screenshots (if relevant)
New layout, with section titles in the page
Old layout but with correct placeholder messages:
Validation error example:
Warning when external checkbox is changed:
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Documentation created/updated
- API support added
- Tests added for this feature/bug
- Has been reviewed by UX
- Has been reviewed by Frontend
- Has been reviewed by Backend
- Has been reviewed by Database
- Conform by the merge request performance guides
- Conform by the style guides
- Squashed related commits together
- Internationalization required/considered
End-to-end tests pass (
package-qamanual pipeline job)