From d94b1271d147fdb5bbd1e616e116173198e858db Mon Sep 17 00:00:00 2001 From: Vlatka Pavisic Date: Mon, 6 Feb 2017 11:42:12 +0100 Subject: Refs #2476 : Disable modification and deletion of resources from another referential; in progress --- app/controllers/calendars_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/controllers/calendars_controller.rb') diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb index 9784820f9..3e7a05231 100644 --- a/app/controllers/calendars_controller.rb +++ b/app/controllers/calendars_controller.rb @@ -1,6 +1,6 @@ class CalendarsController < BreadcrumbController + include PolicyChecker defaults resource_class: Calendar - before_action :check_policy, only: [:edit, :update, :destroy] respond_to :html respond_to :js, only: :index @@ -39,9 +39,5 @@ class CalendarsController < BreadcrumbController calendars = calendars.order(sort_column + ' ' + sort_direction) if sort_column && sort_direction @calendars = calendars.paginate(page: params[:page]) end - - def check_policy - authorize resource - end end -- cgit v1.2.3