Skip to content

Make duo pro trials only available for namespace on premium plan

Doug Stull requested to merge 468774-make-duo-pro-only-premium into master

What does this MR do and why?

Make duo pro trials only available for namespace on premium plan

DB analysis

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

in-app trial page ultimate billing(before, after duo card will be premium only) ultimate trial billing(after care will not exist)
Screenshot_2024-07-25_at_10.39.05_AM Screenshot_2024-07-25_at_10.40.18_AM Screenshot_2024-07-25_at_10.41.58_AM

note: the access denied page will be updated via #470064+

How to set up and validate locally

Feature flag duo_enterprise_trials disabled

Ultimate group

  1. Setup GDK to simulate SaaS.
  2. Create new group.
  3. In rails console make it ultimate.
bin/rails c

Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate'))
  1. Visit /-/trials/duo_pro/new?namespace_id=<new-group-id>. Ensure reachable
  2. Visit the group's billing page groups > billings. Ensure you can see the duo pro trial card.

Ultimate trial group

  1. Setup GDK to simulate SaaS.
  2. Create new group.
  3. In rails console make it ultimate trial.
bin/rails c

Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate trial'))
  1. Visit /-/trials/duo_pro/new?namespace_id=<new-group-id>. Ensure reachable
  2. Visit the group's billing page groups > billings. Ensure you can see the duo pro trial card.

Feature flag duo_enterprise_trials enabled

  1. Enable the feature flag in the rails console with: Feature.enable(:duo_enterprise_trials)
  2. Visit /-/trials/duo_pro/new?namespace_id=<new-group-id>. Ensure not reachable.
  3. Visit the group's billing page groups > billings. Ensure you do not see the duo pro trial card.
  4. In the rails console make the (ultimate) group premium.
bin/rails c

Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'premium'))
  1. Repeat verification steps. This time the items should be accessible.
  2. Repeat the verification steps only for the ultimate trial group.

Related to #468774

Edited by Doug Stull

Merge request reports

Loading