diff options
author | Marius Bobin <mbobin@gitlab.com> | 2019-08-23 20:54:32 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-23 20:54:32 +0000 |
commit | 811252536d036f39e370451060790d727601c2f1 (patch) | |
tree | 32f049c4c4a7e07ff8cc197c1047a946eddfa236 /lib/api/pipelines.rb | |
parent | 459309fa57e86599c53d0d3f867053ceb24d432b (diff) | |
download | gitlab-ce-811252536d036f39e370451060790d727601c2f1.tar.gz |
Read pipelines from public projects though API
Allow users to read pipelines for public projects
with public builds enabled without providing an access token.
Diffstat (limited to 'lib/api/pipelines.rb')
-rw-r--r-- | lib/api/pipelines.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb index 667bf1ec801..9e888368e7b 100644 --- a/lib/api/pipelines.rb +++ b/lib/api/pipelines.rb @@ -4,7 +4,7 @@ module API class Pipelines < Grape::API include PaginationParams - before { authenticate! } + before { authenticate_non_get! } params do requires :id, type: String, desc: 'The project ID' @@ -32,6 +32,7 @@ module API end get ':id/pipelines' do authorize! :read_pipeline, user_project + authorize! :read_build, user_project pipelines = PipelinesFinder.new(user_project, current_user, params).execute present paginate(pipelines), with: Entities::PipelineBasic |