Adds CreateService and Util for MemberPromotion Management
Context
- Currently the logic to identify/control the Promotion Management flow for Ultimate SelfManaged Customers does not account for Custom Roles. It uses
NewRole > GUEST
to check if this Member Role change is a Billable Role Change. - For Ultimate Tier Customers, CustomRoles
Guest+
Roles might still have the access_level of GUEST and be Billable. - We need to modify the logic to handle CustomRoles to ensure every NonBillable to Billable Role change is handled via the Promotion Management Flow.
- And make changes to save the customrole specific field in the table
This is the Third MR:
- The First MR moves the billable logic to a common Util
- This Second MR is modifies the Validation logic to account for member_role_id and persists the same in DB when passed via the service.
What does this MR do and why?
The changes in this MR adds a new CreateService for creating MemberApproval objects.
- There is existing code which was added as part of this MR, which is moved into its own service
- The modification of the UpdateService to use this service is part of the follow up MR.
- This service will be further modified to handle Invited Users aswell, for now it deals with Existing members.
So this MR effectively:
- Adds a Util that captures the common FeatureEnabled logic.
- Adds a service which encapsulates the logic for Queuing Members for Approval.
- Makes changes in the Member::UpdateService to use the service for promotion management flow.
PS: This entire feature is still a WIP and isn't yet release to prod.
ref: https://gitlab.com/gitlab-org/gitlab/-/issues/443491
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Edited by Suraj Tripathi