diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-11-22 11:23:41 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-11-23 12:53:37 +0100 |
commit | eff1b05ab1d50895be668be12de8239def648d97 (patch) | |
tree | 9d837bed49f43e630a985520dc7617ed4cbb3de1 /lib/api | |
parent | 35d6ea4f5ee7605a7f4e4c44cc4b79a40aec9418 (diff) | |
download | gitlab-ce-eff1b05ab1d50895be668be12de8239def648d97.tar.gz |
API: Add endpoint to delete a group shareapi-delete-group-share
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/projects.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 6b856128c2e..ddfde178d30 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -438,6 +438,19 @@ module API end end + params do + requires :group_id, type: Integer, desc: 'The ID of the group' + end + delete ":id/share/:group_id" do + authorize! :admin_project, user_project + + link = user_project.project_group_links.find_by(group_id: params[:group_id]) + not_found!('Group Link') unless link + + link.destroy + no_content! + end + # Upload a file # # Parameters: |