summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-12-14 16:42:04 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-12-22 12:11:31 +0100
commitb19065594989d13a417660fc346f6213cd73674d (patch)
treed6621e4de69aad1bc077a2bf031ec78231041f3b /lib
parentbd96ffb2ee863890f71c67b19230cfe2761c9612 (diff)
downloadgitlab-ce-b19065594989d13a417660fc346f6213cd73674d.tar.gz
Authorize read_build when listing pipeline jobs
Diffstat (limited to 'lib')
-rw-r--r--lib/api/jobs.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/jobs.rb b/lib/api/jobs.rb
index 3cfeb9a2784..bd704f3bf25 100644
--- a/lib/api/jobs.rb
+++ b/lib/api/jobs.rb
@@ -59,6 +59,8 @@ module API
# rubocop: disable CodeReuse/ActiveRecord
get ':id/pipelines/:pipeline_id/jobs' do
pipeline = user_project.ci_pipelines.find(params[:pipeline_id])
+ authorize!(:read_build, pipeline)
+
builds = pipeline.builds
builds = filter_builds(builds, params[:scope])
builds = builds.preload(:job_artifacts_archive, :job_artifacts, project: [:namespace])