Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 00:08:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 00:08:05 +0300
commitabae8f34f377519946a91101ef7abf504454531c (patch)
tree359fab0082860b6850d4a0a492b8f12eb3d4eb0b /app/controllers/projects/pipelines_controller.rb
parent580622bdb3c762a8e89facd8a3946881ee480442 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r--app/controllers/projects/pipelines_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb
index ee102248cb7..ff65f040335 100644
--- a/app/controllers/projects/pipelines_controller.rb
+++ b/app/controllers/projects/pipelines_controller.rb
@@ -13,6 +13,7 @@ class Projects::PipelinesController < Projects::ApplicationController
before_action do
push_frontend_feature_flag(:junit_pipeline_view)
end
+ before_action :ensure_pipeline, only: [:show]
around_action :allow_gitaly_ref_name_caching, only: [:index, :show]
@@ -214,6 +215,10 @@ class Projects::PipelinesController < Projects::ApplicationController
params.require(:pipeline).permit(:ref, variables_attributes: %i[key variable_type secret_value])
end
+ def ensure_pipeline
+ render_404 unless pipeline
+ end
+
# rubocop: disable CodeReuse/ActiveRecord
def pipeline
@pipeline ||= if params[:id].blank? && params[:latest]