[FE] Allow restricting group members by a domain whitelist
Taken from #7297 (comment 161903349)
For the UX, I think we can add this under the
Permissions, LFS and 2FA section settings in Group general settings.
We can add a new text input with the following attributes:
Restrict membership by email
e.g. *@ gitlab.com(space added to avoid pinging the company)
- Help text:
Only users with an email address in this domain can be added to the group.
When adding members to the group via email, I think we can validate addresses in the Frontend:
|Right domain||Wrong domain|
If the address didn't belong to the right domain, the option would be greyed out and an warning line would be added:
Only email addresses in the “*@ gitlab.com” domain can be invited to this group