summaryrefslogtreecommitdiff
path: root/app/controllers/groups_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/groups_controller.rb')
-rw-r--r--app/controllers/groups_controller.rb22
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')