Skip to content

Add verification before namespace creation

What does this MR do and why?

Public issue: gitlab-org/growth/team-tasks#554 (closed)

Private issue: https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/533

This MR implements an experiment where we require users to verify their identity (by providing credit card payment details) before they create a new namespace during signup.

Screenshots or screen recordings

Here is a short screen recording demonstrating this feature: https://youtu.be/t1stz6XY4Kg

How to set up and validate locally

Set up

  1. Setup and run your CustomersDot application locally so that it connects to your local GitLab instance
  2. Enable the combined_registration experiment feature flag by running Feature.enable(:combined_registration) in your Rails console
  3. Enable the require_verification_for_namespace_creation experiment feature flag by running Feature.enable(:require_verification_for_namespace_creation) in your Rails console

Validate

  1. Sign up for a new account or go directly to http://localhost:3000/users/sign_up/groups_projects/new

  2. Validate that the verification page is shown:

    Screenshot Screen_Shot_2022-01-17_at_13.30.43
  3. Verify using the following card details:

    card number: 4242 4242 4242 4242
    expiration date: any future date
    cvc: any 3 digit number
  4. The combined registration page is shown:

    Screenshot Screen_Shot_2022-01-17_at_13.33.21

Migration output

Up
== 20220112115413 AddRequiresVerificationToUserDetails: migrating =============
-- add_column(:user_details, :requires_credit_card_verification, :boolean, {:null=>false, :default=>false})
   -> 0.0068s
== 20220112115413 AddRequiresVerificationToUserDetails: migrated (0.0069s) ====
Down
== 20220112115413 AddRequiresVerificationToUserDetails: reverting =============
-- remove_column(:user_details, :requires_credit_card_verification, :boolean, {:null=>false, :default=>false})
   -> 0.0038s
== 20220112115413 AddRequiresVerificationToUserDetails: reverted (0.0065s) ====

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jay

Merge request reports

Loading