summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarius Bobin <mbobin@gitlab.com>2019-08-23 20:54:32 +0000
committerMayra Cabrera <mcabrera@gitlab.com>2019-08-23 20:54:32 +0000
commit811252536d036f39e370451060790d727601c2f1 (patch)
tree32f049c4c4a7e07ff8cc197c1047a946eddfa236 /lib
parent459309fa57e86599c53d0d3f867053ceb24d432b (diff)
downloadgitlab-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')
-rw-r--r--lib/api/pipelines.rb3
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