Remove purchase seats button for duo enterprise trial
What does this MR do and why?
For a trial or paid Duo Enterprise:
- It's not possible to self-service add seats for Duo Enterprise. The functionality does not exist in customers portal currently
- If the org is lower than Ultimate tier, they will need to upgrade their tier before they are able to add seats regardless.
So this MR removes the “Purchase seats” button from the GitLab Duo and seat utilization group setting pages, plus adjust the styling of the "Contact sales" button when it's the only button rendered.
Related to #503763
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
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.
| Page | Before | After |
|---|---|---|
| /groups/<group_name>/-/settings/gitlab_duo | ![]() |
![]() |
| /groups/<group_name>/-/settings/gitlab_duo/seat_utilization | ![]() |
![]() |
How to set up and validate locally
- Setup gdk to simulate SaaS - https://docs.gitlab.com/ee/development/ee_features.html#simulate-a-saas-instance and restart GDK
- Sign in. Create a new group
- In rails console create an Ultimate subscription for your new group
namespace = Group.last
gitlab_subscription = namespace.gitlab_subscription # find or create a new one if needed
gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate'))
- Apply Duo Enterprise trial to the group
add_on_purchase = GitlabSubscriptions::AddOnPurchase.create(subscription_add_on_id: GitlabSubscriptions::AddOn.find_by(name: 'duo_enterprise').id, namespace: Group.last, started_at: 55.days.ago, expires_on: (Date.today + 5.days), trial: true, quantity: 1, purchase_xid: '1', organization_id: 1)
- Then you can go to
/groups/<group_name>/-/settings/gitlab_duoand/groups/<group_name>/-/settings/gitlab_duo/seat_utilizationto verify the changes.
Edited by Roy Liu



