aboutsummaryrefslogtreecommitdiffstats
path: root/app/policies/chouette/line_policy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies/chouette/line_policy.rb')
-rw-r--r--app/policies/chouette/line_policy.rb36
1 files changed, 19 insertions, 17 deletions
diff --git a/app/policies/chouette/line_policy.rb b/app/policies/chouette/line_policy.rb
index d07ad775c..678191ef7 100644
--- a/app/policies/chouette/line_policy.rb
+++ b/app/policies/chouette/line_policy.rb
@@ -1,23 +1,25 @@
-class Chouette::LinePolicy < ApplicationPolicy
+module Chouette
+ class LinePolicy < ApplicationPolicy
- class Scope < Scope
- def resolve
- scope
+ class Scope < Scope
+ def resolve
+ scope
+ end
end
- end
- def create_footnote?
- !archived? && organisation_match? && user.has_permission?('footnotes.create')
- end
+ def create_footnote?
+ !archived? && organisation_match? && user.has_permission?('footnotes.create')
+ end
- def edit_footnote?
- !archived? && organisation_match? && user.has_permission?('footnotes.update')
- end
+ def edit_footnote?
+ !archived? && organisation_match? && user.has_permission?('footnotes.update')
+ end
- def destroy_footnote?
- !archived? && organisation_match? && user.has_permission?('footnotes.destroy')
- end
+ def destroy_footnote?
+ !archived? && organisation_match? && user.has_permission?('footnotes.destroy')
+ end
- def update_footnote? ; edit_footnote? end
- def new_footnote? ; create_footnote? end
-end
+ def update_footnote? ; edit_footnote? end
+ def new_footnote? ; create_footnote? end
+ end
+end \ No newline at end of file