diff options
author | Manoj MJ <mmj@gitlab.com> | 2019-06-19 10:08:56 +0300 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2019-06-19 10:08:56 +0300 |
commit | 53b17f030161ba2afade8fe3d41b849a7fa41a89 (patch) | |
tree | 9f911580f4bc5d78cb66ffe7e16d1f77f7d23f64 /lib/api/tags.rb | |
parent | 69e1bd389f3cb04d451900f981be646462ffd039 (diff) |
Add documentation and tests
This commit adds
- feature specs
- to test the ability of a user with "developer" permission
to delete tags in repositories.
- documentation
Diffstat (limited to 'lib/api/tags.rb')
-rw-r--r-- | lib/api/tags.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/tags.rb b/lib/api/tags.rb index f5359fd316c..796b1450602 100644 --- a/lib/api/tags.rb +++ b/lib/api/tags.rb @@ -55,7 +55,7 @@ module API optional :release_description, type: String, desc: 'Specifying release notes stored in the GitLab database (deprecated in GitLab 11.7)' end post ':id/repository/tags' do - authorize_push_project + authorize_admin_tag result = ::Tags::CreateService.new(user_project, current_user) .execute(params[:tag_name], params[:ref], params[:message]) @@ -87,7 +87,7 @@ module API requires :tag_name, type: String, desc: 'The name of the tag' end delete ':id/repository/tags/:tag_name', requirements: TAG_ENDPOINT_REQUIREMENTS do - authorize_push_project + authorize_admin_tag tag = user_project.repository.find_tag(params[:tag_name]) not_found!('Tag') unless tag |