diff options
| author | Alban Peignier | 2017-05-03 19:20:41 +0200 |
|---|---|---|
| committer | Alban Peignier | 2017-05-03 19:25:14 +0200 |
| commit | dc3afdd13ee5e58bfd8645cb92f85f8767db83a7 (patch) | |
| tree | 24f1256c11b1ccd5d57fd93c0f71d82c02f034cb /app | |
| parent | c9ffe28651d603b90322ac4d49ef50b20b566e1c (diff) | |
| download | chouette-core-dc3afdd13ee5e58bfd8645cb92f85f8767db83a7.tar.bz2 | |
Fixes seed by adding user permissions and organisation functionnal_scope. Refs #3291
Diffstat (limited to 'app')
| -rw-r--r-- | app/models/user.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 8e73aa1d5..1230a64a1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,3 +1,4 @@ +# coding: utf-8 class User < ActiveRecord::Base # Include default devise modules. Others available are: # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable, :database_authenticatable @@ -32,6 +33,11 @@ class User < ActiveRecord::Base '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'] + mattr_reader :edit_offer_permissions + + def self.all_permissions + edit_offer_permissions + end def cas_extra_attributes=(extra_attributes) extra = extra_attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} |
