Skip to content

Implement multiple eligible namespaces for duo enterprise trials

Doug Stull requested to merge 468051-phase-2-part-1 into master

What does this MR do and why?

Implement multiple eligible namespaces for duo enterprise trials

  • phase 2 of the implementation.
  • adds the ability to select a namespace into the trial application flow.
  • implement access denied page.
  • DRY up some common items at controller layer for duo
  • resolve rubocop items
  • see #468051

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

Click to expand
Screen After
duo enterprise trial lead 1/selected namespace Screenshot_2024-08-20_at_11.03.24_AM
duo enterprise trial lead multiple namespace Screenshot_2024-08-20_at_11.03.41_AM
duo enterprise trial namespace selection Screenshot_2024-08-20_at_1.39.57_PM
duo enterprise trial general error Screenshot_2024-08-20_at_1.40.09_PM
duo enterprise access denied Screenshot_2024-08-20_at_10.48.16_AM

How to set up and validate locally

  1. Setup GDK to simulate SaaS.

  2. Enable duo_enterprise_trials feature flag in bin/rails console with Feature.enable(:duo_enterprise_trials).

  3. Seed the add-ons for your instance from the terminal if they haven't been created yet(rerun will not harm anything if you do have them)

    • FILTER=add_ons bundle exec rake db:seed_fu
  4. Create new group.

  5. In rails console make it ultimate.

bin/rails c

Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate'))
  1. Create another new group and repeat step #5 above.
  2. Visit /-/trials/duo_enterprise/new?step=lead. No specific group name in the form and button has text 'Continue'.
  3. Visit /-/trials/duo_enterprise/new?step=trial. New page.
  4. See form. The submission for each step above is covered by feature specs delivered in this MR that aren't reproducible unless CustomersDot is setup locally.
  5. Remove all eligible groups or comment out this line and visit /-/trials/duo_enterprise/new. Notice access denied page.

Related to #468051

Edited by Doug Stull

Merge request reports

Loading