From d63371ad783db055da840be37ddac0cdcb49db2c Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 26 Jun 2015 16:44:21 +0200 Subject: Update controller filters Signed-off-by: Dmitriy Zaporozhets --- app/controllers/snippets_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/snippets_controller.rb') 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 -- cgit v1.2.1