Skip to content

Add `Groups::EnterpriseUsers::CreateService` service class

What does this MR do and why?

This MR adds a service class Groups::EnterpriseUsers::CreateService that receives group and user. This service marks the user as an enterprise user of the group if the user matches the enterprise user definition for the group based on domain verification:

2. The user's email has a domain that is owned by the company of the paid group, _and_ the user account meets _one of_ the following conditions:
    - was created 2021-02-01 or later.
    - has a SAML or SCIM identity tied to the organization's group.
    - is a member of the organization's group, where the subscription was purchased or renewed 2021-02-01 or later.

Note that this MR just introduces the service, it doesn't apply it to the GitLab system. Follow those links to learn how we are going to use this service:

Note that this MR doesn't add provisioned_by_group_at timestamp attribute #385785 (comment 1258055975). I am going to open a follow-up MR for that to ease the review.

Read Check User and Group Create Date when Claiming ... (#385785 - closed) and its discussion for more details.

Screenshots or screen recordings

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

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

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

Edited by Bogdan Denkovych

Merge request reports

Loading