[FE] Allow restricting group members by a domain whitelist
frontend for https://gitlab.com/gitlab-org/gitlab-ee/issues/7297
Taken from https://gitlab.com/gitlab-org/gitlab-ee/issues/7297#note_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:
- Title:
Restrict membership by email - Placeholder:
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
Edited by Luke Bennett


