summaryrefslogtreecommitdiff
path: root/app/experiments
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-27 09:14:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-27 09:14:40 +0000
commit43511919ac44a093aa93df46fba8f308ae8ddaac (patch)
tree158247fc04a842df963cde07d51058a8283a17ad /app/experiments
parent62b1efcc13b511943d1e0b96f13ce435571997ac (diff)
downloadgitlab-ce-43511919ac44a093aa93df46fba8f308ae8ddaac.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/experiments')
-rw-r--r--app/experiments/require_verification_for_namespace_creation_experiment.rb10
1 files changed, 10 insertions, 0 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..78390ddd099 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
+ 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