Add Max Role Column To Users List on Code Suggestions Tab
What does this MR do and why?
Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/422788. With this MR, we are introducing a new column to the AddOnEligibleUserList component. In particular, the new column will only be visible when:
-
enableAddOnUsersFilteringis enabled - at least one user has a
maxRolefield
Note that the feature does not impact current UI, as the FF is disabled.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| w/ Max Role | w/out Max Role |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Needs both
gdkand CustomersDot running (setup guide) - In Rails console, enable Code Suggestions
Feature.enable(:hamilton_seat_management) - In Rails console, enable the filtering capabilities
Feature.enable(:enable_add_on_users_filtering)
To assign Code Suggestions seats to your group:
- In Rails console,
add_on = GitlabSubscriptions::AddOn.find_or_create_by!(name: "code_suggestions") {|e| e.description = "Test"} - In Rails console,
GitlabSubscriptions::AddOnPurchase.create!(add_on: add_on, namespace: Namespace.find(<you-name-space-id>), expires_on: 21.month.from_now, quantity: 5, purchase_xid: 'A-S0002') - Visit any group or project member pages such as
http://127.0.0.1:3000/groups/flightjs/-/usage_quotas#code-suggestions-usage-tab
To have users with MaxRole:
- update the
tableItemsadding themaxRolefield in the mapped array
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Angelo Gulina

