Display usage quota tab during duo pro trial even group on free plan
What does this MR do and why?
Related to #461881 (closed)
Today, we don't show the Usage Quotas
> GitLab Duo Pro
page for the free tier. But there can be a case when a free group is on Duo pro trial, we want to allow that group to access that page.
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.
How to set up and validate locally
- Setup GDK to simulate SaaS
- Create a new free top-level group.
- Visit the
Usage Quotas
>GitLab Duo Pro
page from group settings in the sidebar, and verifyGitLab Duo Pro
tab is not there - Add a duo pro trial to that namespace in the rails console.
n = Namespace.last
add_on = ::GitlabSubscriptions::AddOn.where(name: ::GitlabSubscriptions::AddOn.names[:code_suggestions]).last
::GitlabSubscriptions::AddOnPurchase.create(add_on: add_on, namespace: n, quantity: 1, expires_on: 30.days.from_now, purchase_xid: SecureRandom.hex(16), trial: true, organization_id: 1)
- Verify that you can see and access the
GitLab Duo Pro
tab.
Edited by Roy Liu