diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-06-08 18:13:31 +0200 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2019-06-08 18:13:31 +0200 |
commit | 5f0687d07a65900654245fd3f68902691316c892 (patch) | |
tree | 55daaed5f6d2e36db0c5c6cb91302d9fd001efcf /lib/api | |
parent | 2a01cb79560a861a7e32e9ee11e823f22e181aa1 (diff) | |
download | gitlab-ce-5f0687d07a65900654245fd3f68902691316c892.tar.gz |
Gate MR head_pipeline behind read_pipeline ability
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index f8b950cb55d..6063303a793 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -755,7 +755,9 @@ module API merge_request.metrics&.pipeline end - expose :head_pipeline, using: 'API::Entities::Pipeline' + expose :head_pipeline, using: 'API::Entities::Pipeline', if: -> (_, options) do + Ability.allowed?(options[:current_user], :read_pipeline, options[:project]) + end expose :diff_refs, using: Entities::DiffRefs |