Implement multiple eligible namespaces for duo enterprise trials
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
How to set up and validate locally
-
Setup GDK to simulate SaaS.
-
Enable
duo_enterprise_trials
feature flag inbin/rails console
withFeature.enable(:duo_enterprise_trials)
. -
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
-
Create new group.
-
In rails console make it ultimate.
bin/rails c
Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate'))
- Create another new group and repeat step #5 above.
- Visit
/-/trials/duo_enterprise/new?step=lead
. No specific group name in the form and button has text 'Continue'. - Visit
/-/trials/duo_enterprise/new?step=trial
. New page. - 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. - 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