Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/experiments/require_verification_for_namespace_creation_experiment.rb')
-rw-r--r--app/experiments/require_verification_for_namespace_creation_experiment.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/experiments/require_verification_for_namespace_creation_experiment.rb b/app/experiments/require_verification_for_namespace_creation_experiment.rb
index 1cadac7e7d4..0c47f5d183c 100644
--- a/app/experiments/require_verification_for_namespace_creation_experiment.rb
+++ b/app/experiments/require_verification_for_namespace_creation_experiment.rb
@@ -1,6 +1,10 @@
# frozen_string_literal: true
-class RequireVerificationForNamespaceCreationExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass
+class RequireVerificationForNamespaceCreationExperiment < ApplicationExperiment
+ exclude :existing_user
+
+ EXPERIMENT_START_DATE = Date.new(2022, 1, 31)
+
def control_behavior
false
end
@@ -24,4 +28,10 @@ class RequireVerificationForNamespaceCreationExperiment < ApplicationExperiment
def subject
context.value[:user]
end
+
+ def existing_user
+ return false unless user_or_actor
+
+ user_or_actor.created_at < EXPERIMENT_START_DATE
+ end
end