diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-26 15:55:56 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-26 15:55:56 +0200 |
commit | 342d5537091e61c1fc52f3e54df926159f326eb8 (patch) | |
tree | 6e852b3f112a6a9f03d05148ed5e73e13582a48e /app/controllers/snippets_controller.rb | |
parent | d5947ada4493335d49368ec193f4b9b801582deb (diff) | |
download | gitlab-ce-342d5537091e61c1fc52f3e54df926159f326eb8.tar.gz |
Rename abilities to correspond contoller/model action namesrename-abilities
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
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r-- | app/controllers/snippets_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index cf672c5c093..0ca71c155c5 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -88,7 +88,7 @@ class SnippetsController < ApplicationController end def authorize_modify_snippet! - return render_404 unless can?(current_user, :modify_personal_snippet, @snippet) + return render_404 unless can?(current_user, :update_personal_snippet, @snippet) end def authorize_admin_snippet! |