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
- Setup and run your
CustomersDot
application locally so that it connects to your local GitLab instance - Enable the
combined_registration
experiment feature flag by runningFeature.enable(:combined_registration)
in your Rails console - Enable the
require_verification_for_namespace_creation
experiment feature flag by runningFeature.enable(:require_verification_for_namespace_creation)
in your Rails console
Validate
-
Sign up for a new account or go directly to
http://localhost:3000/users/sign_up/groups_projects/new
-
Validate that the verification page is shown:
-
Verify using the following card details:
card number: 4242 4242 4242 4242 expiration date: any future date cvc: any 3 digit number
-
The combined registration page is shown:
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.
-
I have evaluated the MR acceptance checklist for this MR.