From a0686b4653208e66c768b63e249bd73406f9e267 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 23 Oct 2023 21:12:16 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../admin/application_settings_controller.rb | 1 - app/controllers/concerns/wiki_actions.rb | 6 ++++-- app/controllers/explore/catalog_controller.rb | 20 ++++++++++++++++++++ app/controllers/groups/settings/ci_cd_controller.rb | 1 - app/controllers/jwt_controller.rb | 6 +----- .../projects/settings/ci_cd_controller.rb | 1 - 6 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 app/controllers/explore/catalog_controller.rb (limited to 'app/controllers') diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index be1edeb0d37..f0b6d86d48d 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -15,7 +15,6 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController before_action do push_frontend_feature_flag(:ci_variables_pages, current_user) - push_frontend_feature_flag(:ci_variable_drawer, current_user) end feature_category :not_owned, [ # rubocop:todo Gitlab/AvoidFeatureCategoryNotOwned diff --git a/app/controllers/concerns/wiki_actions.rb b/app/controllers/concerns/wiki_actions.rb index c606ccf4a07..f8c3e125c3b 100644 --- a/app/controllers/concerns/wiki_actions.rb +++ b/app/controllers/concerns/wiki_actions.rb @@ -246,7 +246,7 @@ module WikiActions @sidebar_page = wiki.find_sidebar(params[:version_id]) unless @sidebar_page # Fallback to default sidebar - @sidebar_wiki_entries, @sidebar_limited = wiki.sidebar_entries + @sidebar_wiki_entries, @sidebar_limited = wiki.sidebar_entries(load_content: Feature.enabled?(:wiki_front_matter_title, container)) end rescue ::Gitlab::Git::CommandTimedOut => e @sidebar_error = e @@ -326,7 +326,9 @@ module WikiActions end def load_content? - return false if %w[history destroy diff show].include?(params[:action]) + skip_actions = Feature.enabled?(:wiki_front_matter_title, container) ? %w[history destroy diff] : %w[history destroy diff show] + + return false if skip_actions.include?(params[:action]) true end diff --git a/app/controllers/explore/catalog_controller.rb b/app/controllers/explore/catalog_controller.rb new file mode 100644 index 00000000000..54f1e0b3722 --- /dev/null +++ b/app/controllers/explore/catalog_controller.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Explore + class CatalogController < Explore::ApplicationController + feature_category :pipeline_composition + before_action :check_feature_flag + + def show; end + + def index + render 'show' + end + + private + + def check_feature_flag + render_404 unless Feature.enabled?(:global_ci_catalog) + end + end +end diff --git a/app/controllers/groups/settings/ci_cd_controller.rb b/app/controllers/groups/settings/ci_cd_controller.rb index f50cdd2b1de..371db7b30b6 100644 --- a/app/controllers/groups/settings/ci_cd_controller.rb +++ b/app/controllers/groups/settings/ci_cd_controller.rb @@ -15,7 +15,6 @@ module Groups before_action do push_frontend_feature_flag(:ci_variables_pages, current_user) - push_frontend_feature_flag(:ci_variable_drawer, current_user) end urgency :low diff --git a/app/controllers/jwt_controller.rb b/app/controllers/jwt_controller.rb index 84ccfbc603a..faa5967d64e 100644 --- a/app/controllers/jwt_controller.rb +++ b/app/controllers/jwt_controller.rb @@ -98,11 +98,7 @@ class JwtController < ApplicationController return unless params[:scope].present? scopes = Array(Rack::Utils.parse_query(request.query_string)['scope']) - if Feature.enabled?(:jwt_auth_space_delimited_scopes, Feature.current_request) - scopes.flat_map(&:split) - else - scopes - end + scopes.flat_map(&:split) end def auth_user diff --git a/app/controllers/projects/settings/ci_cd_controller.rb b/app/controllers/projects/settings/ci_cd_controller.rb index 0845fbc9713..9a128adb926 100644 --- a/app/controllers/projects/settings/ci_cd_controller.rb +++ b/app/controllers/projects/settings/ci_cd_controller.rb @@ -14,7 +14,6 @@ module Projects before_action do push_frontend_feature_flag(:ci_variables_pages, current_user) - push_frontend_feature_flag(:ci_variable_drawer, current_user) end helper_method :highlight_badge -- cgit v1.2.3