diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-26 16:39:17 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-26 16:39:17 +0000 |
commit | 9f166a864959370d3e31931519506887b902cd11 (patch) | |
tree | 62bc450c637f9c0861bfb5964ffcdaec4e4fd0b5 /lib/api/issues.rb | |
parent | 06ab7d89f9835205ee4d2dfd64aac671a7efa891 (diff) | |
parent | 7ca017b5130705770074d455cbc827e487730bf1 (diff) | |
download | gitlab-ce-9f166a864959370d3e31931519506887b902cd11.tar.gz |
Merge branch 'rename-abilities' into 'master'
Rename abilities to correspond contoller/model action names
write_ was renamed to create_
modify_ was renamed to update_
So now in update action we have next code
```
def create
can?(current_user, :create_issue, @issue)
end
def update
can?(current_user, :update_issue, @issue)
end
```
See merge request !896
Diffstat (limited to 'lib/api/issues.rb')
-rw-r--r-- | lib/api/issues.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb index 4d632ce77c1..6e7a7672070 100644 --- a/lib/api/issues.rb +++ b/lib/api/issues.rb @@ -144,7 +144,7 @@ module API # PUT /projects/:id/issues/:issue_id put ":id/issues/:issue_id" do issue = user_project.issues.find(params[:issue_id]) - authorize! :modify_issue, issue + authorize! :update_issue, issue attrs = attributes_for_keys [:title, :description, :assignee_id, :milestone_id, :state_event] # Validate label names in advance |