Skip to content

Skip email domain checks for service accounts

What does this MR do and why?

Skip email domain checks for service accounts

Currently, when a user attempts to add a service account to a subgroup or project where the "Restrict group access by email domain" feature is enabled, they receive an error message. This MR fixes the behavior to skip domain checks for service accounts, and adds a spec to prevent regressions.

See 426906 for more details

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
image Screenshot_2023-11-30_at_2.24.19_PM

How to set up and validate locally

  1. Ensure premium or ultimate license is applied
  2. Create a group top-level
  3. Create a service account user for the top-level group
  4. Enable the restrict group access by email domain feature for this group, using a domain you control ( example.com )
  5. Create a sub-group or project sub-level
  6. Add the service account user to the sub-group or project
  7. Before this MR, the UI and API will display a validation error. After the MR, it should work as expected.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #426906 (closed)

Edited by Andrew Evans

Merge request reports