Skip to content

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)

ff-update

How to set up and validate locally

  1. Make you are on an Ultimate license

  2. Turn on self-managed mode with:

export GITLAB_SIMULATE_SAAS=0
gdk restart
  1. 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)
  1. Navigate to a group that you are an owner of. Go to the Manage > Members page and click on the Invite a group button. Here, invite another group with Guest elevated custom role. If you turn the feature-flag off, the role should go back down to Guest.

  2. Turn on SaaS mode with:

export GITLAB_SIMULATE_SAAS=1
gdk restart
  1. 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>)
  1. Repeat step 3.

Related to #443369

Edited by Hinam Mehra

Merge request reports

Loading