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/referential_lines_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/controllers/referential_lines_controller.rb') diff --git a/app/controllers/referential_lines_controller.rb b/app/controllers/referential_lines_controller.rb index 4ffee27cb..c0d71d891 100644 --- a/app/controllers/referential_lines_controller.rb +++ b/app/controllers/referential_lines_controller.rb @@ -1,5 +1,5 @@ class ReferentialLinesController < ChouetteController - before_action :check_policy, :only => [:edit, :update, :destroy] + include PolicyChecker defaults :resource_class => Chouette::Line, :collection_name => 'lines', :instance_name => 'line' respond_to :html @@ -95,10 +95,6 @@ class ReferentialLinesController < ChouetteController %w[asc desc].include?(params[:direction]) ? params[:direction] : 'asc' end - def check_policy - authorize resource - end - def line_params params.require(:line).permit( :transport_mode, -- cgit v1.2.3