summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-12-20 04:09:47 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-12-22 12:21:31 +0100
commitbda33af666673f5fa041fd863de20cdbae8e1fed (patch)
treeac16766d0ca7122749a95692f4bff7790f213afe
parent10ba71412d7da98b0d03f3fd33620d3217606ad6 (diff)
downloadgitlab-ce-bda33af666673f5fa041fd863de20cdbae8e1fed.tar.gz
Move pipeline auth above pipeline assignment
-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 1a0db72067c..87278631a9e 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.pipelines.find(params[:pipeline_id])
authorize!(:read_pipeline, user_project)
+ pipeline = user_project.pipelines.find(params[:pipeline_id])
authorize!(:read_build, pipeline)
builds = pipeline.builds