diff options
| author | cedricnjanga | 2018-02-19 09:06:47 -0800 | 
|---|---|---|
| committer | cedricnjanga | 2018-03-09 08:48:56 -0800 | 
| commit | 5d4be9c520768563a79414c73829ab10eae52434 (patch) | |
| tree | abf3fa50327a3d0204a6aa11aa00179cdd8f8bc2 | |
| parent | 264f006f1b5a860c01b5370d5fbd1acb02c18e7c (diff) | |
| download | chouette-core-5d4be9c520768563a79414c73829ab10eae52434.tar.bz2 | |
Refs #5934 Only display stop point action links if user has policy
| -rw-r--r-- | app/decorators/stop_point_decorator.rb | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/app/decorators/stop_point_decorator.rb b/app/decorators/stop_point_decorator.rb index e777e2b56..cb4c1e65d 100644 --- a/app/decorators/stop_point_decorator.rb +++ b/app/decorators/stop_point_decorator.rb @@ -11,7 +11,7 @@ class StopPointDecorator < AF83::Decorator        end      end -    instance_decorator.edit_action_link do |l| +    instance_decorator.edit_action_link if: ->{ h.policy(Chouette::StopArea).update? } do |l|        l.content h.t('stop_points.actions.edit')        l.href do          h.edit_stop_area_referential_stop_area_path( @@ -21,7 +21,7 @@ class StopPointDecorator < AF83::Decorator        end      end -    instance_decorator.destroy_action_link do |l| +    instance_decorator.destroy_action_link if: ->{ h.policy(Chouette::StopArea).destroy? } do |l|        l.content h.destroy_link_content('stop_points.actions.destroy')        l.href do          h.referential_stop_area_path( | 
