diff options
Diffstat (limited to 'app/controllers')
7 files changed, 21 insertions, 9 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index d5bc723aa8c..57b976b9121 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -2,7 +2,9 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController include InternalRedirect + before_action :set_application_setting + before_action :whitelist_query_limiting, only: [:usage_data] def show end @@ -102,6 +104,10 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController @application_setting = Gitlab::CurrentSettings.current_application_settings end + def whitelist_query_limiting + Gitlab::QueryLimiting.whitelist('https://gitlab.com/gitlab-org/gitlab-ce/issues/63107') + end + def application_setting_params params[:application_setting] ||= {} diff --git a/app/controllers/concerns/boards_actions.rb b/app/controllers/concerns/boards_actions.rb index ed7ea2f0e04..e4123d87137 100644 --- a/app/controllers/concerns/boards_actions.rb +++ b/app/controllers/concerns/boards_actions.rb @@ -35,4 +35,12 @@ module BoardsActions boards.find(params[:id]) end end + + def serializer + BoardSerializer.new(current_user: current_user) + end + + def serialize_as_json(resource) + serializer.represent(resource, serializer: 'board', include_full_project_path: board.group_board?) + end end diff --git a/app/controllers/concerns/boards_responses.rb b/app/controllers/concerns/boards_responses.rb index 8b191c86397..7625600e452 100644 --- a/app/controllers/concerns/boards_responses.rb +++ b/app/controllers/concerns/boards_responses.rb @@ -69,7 +69,7 @@ module BoardsResponses end def serialize_as_json(resource) - resource.as_json(only: [:id]) + serializer.represent(resource).as_json end def respond_with(resource) @@ -80,4 +80,8 @@ module BoardsResponses end end end + + def serializer + BoardSerializer.new + end end diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb index e002a4d349b..ae46a234aa6 100644 --- a/app/controllers/projects/environments_controller.rb +++ b/app/controllers/projects/environments_controller.rb @@ -13,7 +13,6 @@ class Projects::EnvironmentsController < Projects::ApplicationController before_action only: [:metrics, :additional_metrics, :metrics_dashboard] do push_frontend_feature_flag(:environment_metrics_use_prometheus_endpoint) push_frontend_feature_flag(:environment_metrics_show_multiple_dashboards) - push_frontend_feature_flag(:grafana_dashboard_link) push_frontend_feature_flag(:prometheus_computed_alerts) end @@ -165,7 +164,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController if Feature.enabled?(:environment_metrics_show_multiple_dashboards, project) result = dashboard_finder.find(project, current_user, environment, params[:dashboard]) - result[:all_dashboards] = project.repository.metrics_dashboard_paths + result[:all_dashboards] = dashboard_finder.find_all_paths(project) else result = dashboard_finder.find(project, current_user, environment) end diff --git a/app/controllers/projects/registry/tags_controller.rb b/app/controllers/projects/registry/tags_controller.rb index 567d750caae..bf1d8d8b5fc 100644 --- a/app/controllers/projects/registry/tags_controller.rb +++ b/app/controllers/projects/registry/tags_controller.rb @@ -3,7 +3,7 @@ module Projects module Registry class TagsController < ::Projects::Registry::ApplicationController - before_action :authorize_update_container_image!, only: [:destroy] + before_action :authorize_destroy_container_image!, only: [:destroy] def index respond_to do |format| diff --git a/app/controllers/projects/settings/operations_controller.rb b/app/controllers/projects/settings/operations_controller.rb index b5c77e5bbf4..5cfb0ac307d 100644 --- a/app/controllers/projects/settings/operations_controller.rb +++ b/app/controllers/projects/settings/operations_controller.rb @@ -5,10 +5,6 @@ module Projects class OperationsController < Projects::ApplicationController before_action :authorize_update_environment! - before_action do - push_frontend_feature_flag(:grafana_dashboard_link) - end - helper_method :error_tracking_setting def show diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index cb25548c83f..a80ab3bcd28 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -25,7 +25,6 @@ class SearchController < ApplicationController @show_snippets = search_service.show_snippets? @search_results = search_service.search_results @search_objects = search_service.search_objects - @display_options = search_service.display_options render_commits if @scope == 'commits' eager_load_user_status if @scope == 'users' |
