Add ability to select multiple users for bulk action
What does this MR do and why?
Add ability to select multiple users for bulk action
- Add a new column for the user selection checkbox
- Show a summary of number of users selected
- Add new tests for changes made
This is one of the first MRs that collectively implement add-on bulk assignment feature. Please see below the breakdown.
MR | Status |
---|---|
Add ability select multiple users |
|
Show confirmation modal with selected users | |
API integration to assign add-on to selected users |
Related to #442370
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.
Scenario | Screenshot |
---|---|
SaaS - [No change] |
|
SaaS - |
|
Self Managed [No change] |
How to set up and validate locally
SaaS
SaaS steps
Application setup
- Customers Dot needs to be setup in order to view the billing page for a group
- Start GDK in SaaS mode
GITLAB_SIMULATE_SAAS=1 gdk start
Group setup
- Create a Group
- Buy a Subscription for your group from
Settings
>Billing
Feature flag
Run the following in your rails console
Feature.enable(:hamilton_seat_management, Namespace.find(your-group-id))
Feature.enable(:gitlab_com_duo_pro_bulk_user_assignment, Namespace.find(your-group-id))
Add-on purchase
Purchase an add-on for the subscription purchased above in Group setup
step by following the instructions here (under Add Code Suggestions Add-On to a subscription
section).
Code Suggestions tab
- Visit
/groups/<your-namespace-name>/-/usage_quotas#code-suggestions-usage-tab
SM
SM steps
Application setup
- Customers Dot needs to be setup
- Start GDK in SM mode
GITLAB_SIMULATE_SAAS=0 gdk start
Feature flag
Run the following in your rails console using GITLAB_SIMULATE_SAAS=0 rails c
Feature.enable(:self_managed_code_suggestions)
Subscription setup
- Buy
Self-Managed Ultimate 1 Year
subscription on Zuora Sandbox - Copy the license key from the subscription details page on local Customers Dot instance
- Paste the license key on your SM instance at
Admin Area > Settings > General > Add license
- Refresh the page to see the
Code Suggestions
Menu item appear underAdmin Area
Add-on purchase
Purchase add-on seats by running the following on rails console GITLAB_SIMULATE_SAAS=0 rails c
# create an add_on record if not already created
add_on = GitlabSubscriptions::AddOn.find_or_create_by!(name: "code_suggestions") {|e| e.description = "Test"}
# create add_on_purchase record without the namespace, mimicking SM instance
add_on_purchase = GitlabSubscriptions::AddOnPurchase.create!(add_on: add_on, expires_on: 1.year.from_now, quantity: 10, purchase_xid: 'A-12345')
Code Suggestions menu item
- Log in to the SM instance as an admin, eg.
root
- Visit Code Suggestions Seat management page by clicking on
Code Suggestions
menu item underAdmin Area