diff options
| author | Guillaume | 2017-11-28 15:44:16 +0100 |
|---|---|---|
| committer | Guillaume | 2017-11-28 15:44:16 +0100 |
| commit | 9a8ddef8dbfec3ac656b0980a1614b8720e6a950 (patch) | |
| tree | cfec65c71ae71e12ee25c6bf4d6fcb6eccdd8840 | |
| parent | 2b11404b58dad37cc9e5dae3e24bcf7b466f5c32 (diff) | |
| download | chouette-core-9a8ddef8dbfec3ac656b0980a1614b8720e6a950.tar.bz2 | |
Refs #4824, #4825 fix error line_decorator
| -rw-r--r-- | app/decorators/line_decorator.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/decorators/line_decorator.rb b/app/decorators/line_decorator.rb index ee35cd85e..ede670cbd 100644 --- a/app/decorators/line_decorator.rb +++ b/app/decorators/line_decorator.rb @@ -21,7 +21,7 @@ class LineDecorator < Draper::Decorator href: [context[:line_referential], object.company] ) - if h.policy(Chouette::Line).update? && + if h.policy(Chouette::Line).create? && context[:line_referential].organisations.include?( context[:current_organisation] ) @@ -48,6 +48,8 @@ class LineDecorator < Draper::Decorator method: :delete, data: {confirm: h.t('lines.actions.destroy_confirm')} ) + end + links end end |
