aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorRobert2017-07-03 15:34:11 +0200
committerRobert2017-07-04 21:54:04 +0200
commitc48ad4fde3056ef04645b73f7eab54ff867d370c (patch)
tree57af273b48f1ece1b5e16244d6957f407a5d9563 /app/models
parent747d333ffbcc8ee0c9f1daf93ccca32799434e04 (diff)
downloadchouette-core-c48ad4fde3056ef04645b73f7eab54ff867d370c.tar.bz2
Refs: #3478@1h
newapplication helper default authorization, (no if) -> * DefaultPolicy (all true) * Add some policies (LinePolicy) * Use `boiv:read` pour show, index * Adapted `table_builder`
Diffstat (limited to 'app/models')
-rw-r--r--app/models/chouette/stop_point.rb5
-rw-r--r--app/models/user.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/app/models/chouette/stop_point.rb b/app/models/chouette/stop_point.rb
index e0f947487..1cc1ed7a3 100644
--- a/app/models/chouette/stop_point.rb
+++ b/app/models/chouette/stop_point.rb
@@ -1,5 +1,10 @@
module Chouette
class StopPoint < TridentActiveRecord
+
+ def self.policy_class
+ DefaultPolicy
+ end
+
include ForBoardingEnumerations
include ForAlightingEnumerations
diff --git a/app/models/user.rb b/app/models/user.rb
index 4ba05b164..31fc4ef78 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -31,7 +31,7 @@ class User < ActiveRecord::Base
@@edit_offer_permissions = ['routes.create', 'routes.edit', 'routes.destroy', 'journey_patterns.create', 'journey_patterns.edit', 'journey_patterns.destroy',
'vehicle_journeys.create', 'vehicle_journeys.edit', 'vehicle_journeys.destroy', 'time_tables.create', 'time_tables.edit', 'time_tables.destroy',
'footnotes.edit', 'footnotes.create', 'footnotes.destroy', 'routing_constraint_zones.create', 'routing_constraint_zones.edit',
- 'routing_constraint_zones.destroy', 'referentials.create', 'referentials.edit', 'referentials.destroy', 'boiv:edit-offer']
+ 'routing_constraint_zones.destroy', 'referentials.create', 'referentials.edit', 'referentials.destroy', 'boiv:edit-offer', 'boiv:read-offer']
mattr_reader :edit_offer_permissions
def self.all_permissions