diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-19 03:06:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-19 03:06:07 +0000 |
commit | 7f3bff1556594dcdc1beca40d083ba7263965e21 (patch) | |
tree | ab18d957d9bc7b2888c6e9fa9b281a7c1cb8927b /app/controllers | |
parent | 8d0aed5e4a6ae59232cfa5ca168fa1b87073520d (diff) | |
download | gitlab-ce-7f3bff1556594dcdc1beca40d083ba7263965e21.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/clusters/clusters_controller.rb | 6 | ||||
-rw-r--r-- | app/controllers/concerns/notes_actions.rb | 6 | ||||
-rw-r--r-- | app/controllers/projects/error_tracking_controller.rb | 5 |
3 files changed, 11 insertions, 6 deletions
diff --git a/app/controllers/clusters/clusters_controller.rb b/app/controllers/clusters/clusters_controller.rb index 9a539cf7c24..673ead04709 100644 --- a/app/controllers/clusters/clusters_controller.rb +++ b/app/controllers/clusters/clusters_controller.rb @@ -172,11 +172,7 @@ class Clusters::ClustersController < Clusters::BaseController private def destroy_params - # To be uncomented on https://gitlab.com/gitlab-org/gitlab/merge_requests/16954 - # This MR got split into other since it was too big. - # - # params.permit(:cleanup) - {} + params.permit(:cleanup) end def update_params diff --git a/app/controllers/concerns/notes_actions.rb b/app/controllers/concerns/notes_actions.rb index fbae4c53c31..3d599d9e7f9 100644 --- a/app/controllers/concerns/notes_actions.rb +++ b/app/controllers/concerns/notes_actions.rb @@ -63,7 +63,11 @@ module NotesActions json.merge!(note_json(@note)) end - render json: json + if @note.errors.present? && @note.errors.keys != [:commands_only] + render json: json, status: :unprocessable_entity + else + render json: json + end end format.html { redirect_back_or_default } end diff --git a/app/controllers/projects/error_tracking_controller.rb b/app/controllers/projects/error_tracking_controller.rb index 9dea6b663ea..7143424473e 100644 --- a/app/controllers/projects/error_tracking_controller.rb +++ b/app/controllers/projects/error_tracking_controller.rb @@ -2,6 +2,7 @@ class Projects::ErrorTrackingController < Projects::ApplicationController before_action :authorize_read_sentry_issue! + before_action :set_issue_id, only: [:details, :stack_trace] POLLING_INTERVAL = 10_000 @@ -113,6 +114,10 @@ class Projects::ErrorTrackingController < Projects::ApplicationController params.permit(:issue_id) end + def set_issue_id + @issue_id = issue_details_params[:issue_id] + end + def set_polling_interval Gitlab::PollingInterval.set_header(response, interval: POLLING_INTERVAL) end |