Skip to content

Modified UpdateService to use the MemberManagement::CreateService

What does this MR do and why?

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 Fourth MR:

  • The First MR moves the billable logic to a common Util
  • The Second MR is modifies the Validation logic to account for member_role_id and persists the same in DB when passed via the service.
  • The Third MR CreateService for creating MemberApproval objects.

What does this MR do and why?

The changes in this MR uses the CreateService and Util that was added in the previous MR

  • Modifies UpdateService to use the CreateService
  • Removes codes that ̇were part of the member model, but now has been moved to Util

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

Merge request reports