summaryrefslogtreecommitdiff
path: root/app/controllers/groups_controller.rb
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/controllers/groups_controller.rb
parent62b1efcc13b511943d1e0b96f13ce435571997ac (diff)
downloadgitlab-ce-43511919ac44a093aa93df46fba8f308ae8ddaac.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r--app/controllers/groups_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 4acbb0482f3..f96e080ecf8 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -38,6 +38,8 @@ class GroupsController < Groups::ApplicationController
before_action :check_export_rate_limit!, only: [:export, :download_export]
+ before_action :track_experiment_event, only: [:new]
+
helper_method :captcha_required?
skip_cross_project_access_check :index, :new, :create, :edit, :update,
@@ -378,6 +380,12 @@ class GroupsController < Groups::ApplicationController
def captcha_required?
captcha_enabled? && !params[:parent_id]
end
+
+ def track_experiment_event
+ return if params[:parent_id]
+
+ experiment(:require_verification_for_namespace_creation, user: current_user).track(:start_create_group)
+ end
end
GroupsController.prepend_mod_with('GroupsController')