Refactor trial parameter concerns in saas onboarding
What does this MR do and why?
Refactor some parameter concerns in saas onboarding.
- some tuning around wether to pass/show trial param.
- switch from only passing if true to only passing if it was passed and had value
Trial param
-
trial
exist and istrue
if the user registers throughtrial_registrations/new
path. Otherwise the parameter will not exist(yet).trial_registrations/new
is only available on SaaS. - User is redirected to the
WelcomeController#show
.
old way to pass the trial param to company controller
-
ee/app/views/registrations/welcome/_setup_for_company.html.haml
partial that is part of theWelcomeController#show
form submission adds a hidden field oftrial
that will always be submitted(even if no trial param passed to theshow
action. - If the user is directed to the company controller next, this
trial
param is passed, only if it istrue
.
new way to pass the trial param to company controller
- The
WelcomeController#show
form submission now has the param added on the submission URL for the update only iftrial
exists in the params and has value. - If the user is directed to the company controller next, this
trial
param is passed.
How to set up and validate locally
All variations of this can be validated by the feature specs in ee/spec/features/registrations/saas
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #422074 (closed)
Edited by Doug Stull