diff options
| author | Vlatka Pavisic | 2017-02-06 11:42:12 +0100 | 
|---|---|---|
| committer | Vlatka Pavisic | 2017-02-07 11:25:29 +0100 | 
| commit | d94b1271d147fdb5bbd1e616e116173198e858db (patch) | |
| tree | e1b5631e72e009ffd80fdf4e47159b2b11cd899e /app/controllers/line_footnotes_controller.rb | |
| parent | 9c3095c20aaef122212ed71ce8818e3a18b13308 (diff) | |
| download | chouette-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.rb | 4 | 
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 | 
