aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/line_footnotes_controller.rb
diff options
context:
space:
mode:
authorVlatka Pavisic2017-02-06 11:42:12 +0100
committerVlatka Pavisic2017-02-07 11:25:29 +0100
commitd94b1271d147fdb5bbd1e616e116173198e858db (patch)
treee1b5631e72e009ffd80fdf4e47159b2b11cd899e /app/controllers/line_footnotes_controller.rb
parent9c3095c20aaef122212ed71ce8818e3a18b13308 (diff)
downloadchouette-core-d94b1271d147fdb5bbd1e616e116173198e858db.tar.bz2
Refs #2476 : Disable modification and deletion of resources from another referential; in progress
Diffstat (limited to 'app/controllers/line_footnotes_controller.rb')
-rw-r--r--app/controllers/line_footnotes_controller.rb4
1 files changed, 3 insertions, 1 deletions
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