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
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/deployments.rb')
-rw-r--r--lib/api/deployments.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/api/deployments.rb b/lib/api/deployments.rb
index 3a0eea677b8..8161c2b850f 100644
--- a/lib/api/deployments.rb
+++ b/lib/api/deployments.rb
@@ -68,6 +68,7 @@ module API
desc: 'The status to filter deployments by. One of `created`, `running`, `success`, `failed`, `canceled`, or `blocked`'
end
+ route_setting :authentication, job_token_allowed: true
get ':id/deployments' do
authorize! :read_deployment, user_project
@@ -92,6 +93,7 @@ module API
params do
requires :deployment_id, type: Integer, desc: 'The ID of the deployment'
end
+ route_setting :authentication, job_token_allowed: true
get ':id/deployments/:deployment_id' do
authorize! :read_deployment, user_project
@@ -129,9 +131,10 @@ module API
requires :status,
type: String,
- desc: 'The status to filter deployments by. One of `running`, `success`, `failed`, or `canceled`',
+ desc: 'The status of the deployment that is created. One of `running`, `success`, `failed`, or `canceled`',
values: %w[running success failed canceled]
end
+ route_setting :authentication, job_token_allowed: true
post ':id/deployments' do
authorize!(:create_deployment, user_project)
authorize!(:create_environment, user_project)
@@ -175,6 +178,7 @@ module API
desc: 'The new status of the deployment. One of `running`, `success`, `failed`, or `canceled`',
values: %w[running success failed canceled]
end
+ route_setting :authentication, job_token_allowed: true
put ':id/deployments/:deployment_id' do
authorize!(:read_deployment, user_project)
@@ -207,6 +211,7 @@ module API
params do
requires :deployment_id, type: Integer, desc: 'The ID of the deployment'
end
+ route_setting :authentication, job_token_allowed: true
delete ':id/deployments/:deployment_id' do
deployment = user_project.deployments.find(params[:deployment_id])
@@ -240,7 +245,7 @@ module API
use :merge_requests_base_params
end
-
+ route_setting :authentication, job_token_allowed: true
get ':id/deployments/:deployment_id/merge_requests' do
authorize! :read_deployment, user_project