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
path: root/lib/api
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-12-20 06:09:47 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-12-20 06:09:47 +0300
commitccc227e6674e5ae42519776b82ce899193973496 (patch)
tree81a82195834ccf8db290202ba7ca0b8e4e2369a9 /lib/api
parent89b856e76c5e77428535f169350443272a34e1d8 (diff)
Move pipeline auth above pipeline assignment
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/jobs.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb
index e2ab60f3855..45c694b6448 100644
--- a/lib/api/jobs.rb
+++ b/lib/api/jobs.rb
@@ -58,8 +58,8 @@ module API
end
# rubocop: disable CodeReuse/ActiveRecord
get ':id/pipelines/:pipeline_id/jobs' do
- pipeline = user_project.ci_pipelines.find(params[:pipeline_id])
authorize!(:read_pipeline, user_project)
+ pipeline = user_project.ci_pipelines.find(params[:pipeline_id])
authorize!(:read_build, pipeline)
builds = pipeline.builds