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/line_footnotes_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/controllers/line_footnotes_controller.rb') diff --git a/app/controllers/line_footnotes_controller.rb b/app/controllers/line_footnotes_controller.rb index 3b44d087c..192f902c8 100644 --- a/app/controllers/line_footnotes_controller.rb +++ b/app/controllers/line_footnotes_controller.rb @@ -1,6 +1,6 @@ class LineFootnotesController < ChouetteController defaults :resource_class => Chouette::Line, :instance_name => 'line' - before_action :check_policy, only: [:edit, :update, :destroy] + include PolicyChecker belongs_to :referential def show @@ -24,6 +24,8 @@ class LineFootnotesController < ChouetteController end protected + + # overrides default def check_policy authorize resource, "#{action_name}_footnote?".to_sym end -- cgit v1.2.3