Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorKamil TrzciƄski <kamil@gitlab.com>2019-01-28 15:12:30 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2019-01-31 18:52:50 +0300
commitd4c7214799586a9b5063b0ea5b4327bbffe1170f (patch)
tree5e39656039d6f73e19b4cbc3575dba65d44aee4d /lib/api
parent4b868ba8e71be9aa5591378555122d76c27ac777 (diff)
[master] Pipelines section is available to unauthorized users
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/pipelines.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/pipelines.rb b/lib/api/pipelines.rb
index 1f59b27f685..ac8fe98e55e 100644
--- a/lib/api/pipelines.rb
+++ b/lib/api/pipelines.rb
@@ -76,7 +76,7 @@ module API
requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
end
get ':id/pipelines/:pipeline_id' do
- authorize! :read_pipeline, user_project
+ authorize! :read_pipeline, pipeline
present pipeline, with: Entities::Pipeline
end
@@ -104,7 +104,7 @@ module API
requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
end
post ':id/pipelines/:pipeline_id/retry' do
- authorize! :update_pipeline, user_project
+ authorize! :update_pipeline, pipeline
pipeline.retry_failed(current_user)
@@ -119,7 +119,7 @@ module API
requires :pipeline_id, type: Integer, desc: 'The pipeline ID'
end
post ':id/pipelines/:pipeline_id/cancel' do
- authorize! :update_pipeline, user_project
+ authorize! :update_pipeline, pipeline
pipeline.cancel_running