Create two feature-flags to assign custom roles to groups
What does this MR do and why?
- This MR is in a series of MRs to resolve #443369
- Since, this feature affects billing, we need a way to roll it out safely.
- Hence, this MR splits the one feature-flag we previously had, into two - one for SaaS and another for self-managed.
- On SaaS, the feature will be rolled out per namespace, and on self-managed we can roll it out per instance.
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
(functionality remains unchanged, but I have included a video to demonstrate)
How to set up and validate locally
-
Make you are on an Ultimate license
-
Turn on self-managed mode with:
export GITLAB_SIMULATE_SAAS=0
gdk restart
- In the rails console:
Feature.enable(:assign_custom_roles_to_group_links_sm)
MemberRole.create(base_access_level: 10, name: "Guest elevated (self-managed)", admin_cicd_variables: true)
-
Navigate to a group that you are an owner of. Go to the
Manage > Members
page and click on theInvite a group
button. Here, invite another group withGuest elevated
custom role. If you turn the feature-flag off, the role should go back down toGuest
. -
Turn on SaaS mode with:
export GITLAB_SIMULATE_SAAS=1
gdk restart
- In the rails console:
Feature.enable(:assign_custom_roles_to_group_links_saas, <GROUP>)
GroupGroupLink.delete_all
MemberRole.create(base_access_level: 10, name: "Guest elevated (saas)", admin_cicd_variables: true, namespace_id: <GROUP_ID>)
- Repeat step 3.
Related to #443369
Edited by Hinam Mehra