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
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-12-20 06:09:47 +0300
committerMatija Čupić <matteeyah@gmail.com>2018-12-22 14:11:41 +0300
commit0c714937eb868af55c37f1e4900c20dc7015f9c6 (patch)
tree6617bc16eea616496fcd486ad6891c6d381d9891 /lib
parent8a36125ada579300f746e0f2207282149acdf1b3 (diff)
Move pipeline auth above pipeline assignment
Diffstat (limited to 'lib')
-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