summaryrefslogtreecommitdiff
path: root/app/controllers/snippets_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-26 16:44:21 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-26 16:44:21 +0200
commitd63371ad783db055da840be37ddac0cdcb49db2c (patch)
treeafb0b00befbf10caaf5c617db1e72cad35ad75f9 /app/controllers/snippets_controller.rb
parent342d5537091e61c1fc52f3e54df926159f326eb8 (diff)
downloadgitlab-ce-d63371ad783db055da840be37ddac0cdcb49db2c.tar.gz
Update controller filters
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r--app/controllers/snippets_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb
index 0ca71c155c5..8e7e45c781f 100644
--- a/app/controllers/snippets_controller.rb
+++ b/app/controllers/snippets_controller.rb
@@ -2,7 +2,7 @@ class SnippetsController < ApplicationController
before_action :snippet, only: [:show, :edit, :destroy, :update, :raw]
# Allow modify snippet
- before_action :authorize_modify_snippet!, only: [:edit, :update]
+ before_action :authorize_update_snippet!, only: [:edit, :update]
# Allow destroy snippet
before_action :authorize_admin_snippet!, only: [:destroy]
@@ -87,7 +87,7 @@ class SnippetsController < ApplicationController
end
end
- def authorize_modify_snippet!
+ def authorize_update_snippet!
return render_404 unless can?(current_user, :update_personal_snippet, @snippet)
end