diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /app/controllers/groups_controller.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) | |
download | gitlab-ce-a7b3560714b4d9cc4ab32dffcd1f74a284b93580.tar.gz |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r-- | app/controllers/groups_controller.rb | 22 |
1 files changed, 22 insertions, 0 deletions
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') |