diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-31 15:17:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-31 15:17:41 +0300 |
commit | 8bdb37de3a85f3e6b02963bcc938a3a830109e45 (patch) | |
tree | bfd5447a1adab314a6f9ce99155ef285a2de4935 /app/experiments | |
parent | 1edfc04d9f768d6cfa9256eaa54f382112be7497 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/experiments')
-rw-r--r-- | app/experiments/require_verification_for_namespace_creation_experiment.rb | 10 |
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 |