From a7b3560714b4d9cc4ab32dffcd1f74a284b93580 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 18 Feb 2022 09:45:46 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-8-stable-ee --- app/controllers/groups_controller.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'app/controllers/groups_controller.rb') diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 4acbb0482f3..12af76efe0d 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, @@ -207,6 +209,20 @@ class GroupsController < Groups::ApplicationController end end + def issues + return super if !html_request? || Feature.disabled?(:vue_issues_list, group, default_enabled: :yaml) + + @has_issues = IssuesFinder.new(current_user, group_id: group.id).execute + .non_archived + .exists? + + @has_projects = group_projects.exists? + + respond_to do |format| + format.html + end + end + protected def render_show_html @@ -378,6 +394,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') -- cgit v1.2.1