PageSize selection to Duo add on eligible users list
What does this MR do and why?
Relates to #442149 (closed)
With the goal of making it easy for customers to manage their Duo assignments, we plan to display a dropdown with the ability to choose between 20
/50
/100
user items. This will also allow them to assign/unassign users based on the selected number of user items. This MR implements this functionality from a frontend perspective, whereas backend is covered by #500036 (closed)
Note: The backend currently only allows up to 50 user assignments/unassignments, the limit extention to 100 is about to go live soon through a different MR. It should be safe to merge this MR as the feature is behind a feature flag and will only be rolled out when all the components are merged.
Screenshots or screen recordings
Bulk selection and assignment | Screen Recording 2024-10-23 at 10.56.11.mov |
Bulk unassignment | Screen Recording 2024-10-23 at 11.07.38.mov |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Needs both
gdk
and CustomersDot running forSaaS/SM
(setup guide) - In Rails console, enable the FF
Feature.enable(:enable_add_on_users_pagesize_selection)
To assign Code Suggestions seats to your group:
For Saas:
- 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: 100, purchase_xid: 'A-S0002')
- Visit any group or project member pages such as
http://localhost:3000/groups/flightjs/-/usage_quotas#code-suggestions-usage-tab
- The eligible users list should display a new dropdown to choose the number of user items.
For SM:
- 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, expires_on: 21.month.from_now, quantity: 5, purchase_xid: 'A-S0002')
- Visit admin section's Duo area
http://localhost:3000/admin/code_suggestions
- The eligible users list should display a new dropdown to choose the number of user items.
Related to #442149 (closed)