summaryrefslogtreecommitdiff
path: root/app/controllers/projects/merge_requests_controller.rb
diff options
context:
space:
mode:
authordrew cimino <dcimino@gitlab.com>2019-06-28 10:40:34 -0400
committerdrew cimino <dcimino@gitlab.com>2019-07-05 11:24:33 -0400
commit019caa8de59f0ca701d4f099a4068605b17e3b93 (patch)
tree75d68bf840dd0de0261595ddf4b64b2740de6740 /app/controllers/projects/merge_requests_controller.rb
parent2ad75a4f96c4d377e18788966e7eefee4d78b6d2 (diff)
downloadgitlab-ce-019caa8de59f0ca701d4f099a4068605b17e3b93.tar.gz
Use MergeRequest#source_project as permissions reference for MergeRequest#all_pipelines
MergeRequest#all_pipelines fetches Ci::Pipeline records from the source project, so we should specifically check that project for permissions. This was already happening for intra-project merge requests, but in the event that the target and source projects both have private builds, we should ensure that the project permissions are respected.
Diffstat (limited to 'app/controllers/projects/merge_requests_controller.rb')
-rw-r--r--app/controllers/projects/merge_requests_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 7ee8e0ea8f8..7f87fc3792a 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -82,7 +82,8 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
end
def pipelines
- @pipelines = @merge_request.all_pipelines.page(params[:page]).per(30)
+ set_pipeline_variables
+ @pipelines = @pipelines.page(params[:page]).per(30)
Gitlab::PollingInterval.set_header(response, interval: 10_000)