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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-09 03:08:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-09 03:08:14 +0300
commited4df05ce917d6cf175aeb508b0485ae5f281a0a (patch)
tree9313abd8fd41a78eb2bf1ffd0f95f10b69cd25cb /lib/api
parent1bdb3fe3821fc3d222361d8b2e2ec2fea2915372 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/deploy_tokens.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/api/deploy_tokens.rb b/lib/api/deploy_tokens.rb
index 3224157ca05..e10a12b6c46 100644
--- a/lib/api/deploy_tokens.rb
+++ b/lib/api/deploy_tokens.rb
@@ -34,5 +34,22 @@ module API
present paginate(user_project.deploy_tokens), with: Entities::DeployToken
end
end
+
+ params do
+ requires :id, type: Integer, desc: 'The ID of a group'
+ end
+ resource :groups, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ desc 'Delete a group deploy token' do
+ detail 'This feature was introduced in GitLab 12.9'
+ end
+ delete ':id/deploy_tokens/:token_id' do
+ authorize!(:destroy_deploy_token, user_group)
+
+ deploy_token = user_group.group_deploy_tokens
+ .find_by_deploy_token_id!(params[:token_id])
+
+ destroy_conditionally!(deploy_token)
+ end
+ end
end
end