Skip to content

[Backend] API for Step 2 of Trial

Aishwarya Subramanian requested to merge step-2-trial into master

What does this MR do?

It completes some missing things from Step 1:

  • Adds a custom redirect URL to be used after a successful sign in on sign up.
  • Marks the new account to be created as confirmed.

And support for Step 2:

  • Adds a new endpoint to be used by the new view with the trial details: GET /-/trials/new (new_trial_path)
  • Adds a new endpoint to process the form with trial details: POST /-/trials/create_lead (create_lead_trials_path)
  • Redirects user to Step 1 in case they are unauthenticated and try to go to step 2.
  • Adds a template service (GitlabSubscriptions::CreateLeadService) that will consume the Subscriptions Portal API to be implemented in a different MR.

REF: #13233 (closed)

Does this MR meet the acceptance criteria?

Conformity

API contract:

GET /-/trials/apply

Request:

{
  namespace_id: <namespace_id>
}

Response:

On success: Redirects to group show page

On failure: Redirects back to select namespace page for trials /-/trials/select_namespace

Performance and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Aishwarya Subramanian

Merge request reports