Skip to content
Snippets Groups Projects
Verified Commit 6063a1e6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Add labels api authorization. Update permission doc

parent 27cf081e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -23,6 +23,7 @@ If a user is a GitLab administrator they receive all permissions.
| Add tags | | | ✓ | ✓ | ✓ |
| Write a wiki | | | ✓ | ✓ | ✓ |
| Manage issue tracker | | | ✓ | ✓ | ✓ |
| Manage labels | | | ✓ | ✓ | ✓ |
| Create new milestones | | | | ✓ | ✓ |
| Add new team members | | | | ✓ | ✓ |
| Push to protected branches | | | | ✓ | ✓ |
Loading
Loading
Loading
Loading
@@ -24,6 +24,7 @@ module API
# Example Request:
# POST /projects/:id/labels
post ':id/labels' do
authorize! :admin_label, user_project
required_attributes! [:name, :color]
 
attrs = attributes_for_keys [:name, :color]
Loading
Loading
@@ -51,6 +52,7 @@ module API
# Example Request:
# DELETE /projects/:id/labels
delete ':id/labels' do
authorize! :admin_label, user_project
required_attributes! [:name]
 
label = user_project.find_label(params[:name])
Loading
Loading
@@ -71,6 +73,7 @@ module API
# Example Request:
# PUT /projects/:id/labels
put ':id/labels' do
authorize! :admin_label, user_project
required_attributes! [:name]
 
label = user_project.find_label(params[:name])
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment