Skip to content

Improve UX for 404 error for Duo Pro trial page

What does this MR do and why?

Improve UX for 404 page when non-group owner role attempts to access /-/trials/duo_pro/new

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.

Before After
Screenshot_2024-05-17_at_11.01.10 Screenshot_2024-05-21_at_10.16.48
Screenshot_2024-05-17_at_11.01.16 Screenshot_2024-05-21_at_10.16.53

How to set up and validate locally

bin/rails c

Feature.disable(:duo_pro_trials)
  • Sign out. Sign up with new user.
  • Visit /-/trials/duo_pro/new. Make sure page returns 404.
bin/rails c

Feature.enable(:duo_pro_trials)
  • Reload page. Make sure page returns access denied.
  • Go back. Create new group.
  • Visit /-/trials/duo_pro/new. Make sure page returns access denied.
  • In rails console make it ultimate.
bin/rails c

Group.last.gitlab_subscription.update(hosted_plan: Plan.find_by(name: 'ultimate'))
  • Go back. Visit group billing page.
  • Click Start a free GitLab Duo Pro trial.
  • Make sure page loads Duo Pro trial.
  • Visit /-/trials/duo_pro/new?namespace_id=1.
  • Make sure page returns access denied.
  • Click Go back button.
  • Make sure browser redirects back.
  • Go forward. Click sign out button.
  • Make sure you are signed out.

Related to #460504

Edited by Serhii Yarynovskyi

Merge request reports