Configure OSEM via environment variables

Instead of reading a yaml file we get configuration from the
environment.
This commit is contained in:
Henne Vogelsang 2016-03-22 18:14:40 +01:00
parent 45c31f210f
commit ebcb2780cd
17 changed files with 39 additions and 34 deletions

View file

@ -45,7 +45,7 @@ class Ability
# can view Commercials of confirmed Events
can :show, Commercial, commercialable_type: 'Event', commercialable_id: Event.where(state: 'confirmed').pluck(:id)
can [:show, :create], User
unless CONFIG['authentication']['ichain']['enabled']
unless ENV['OSEM_ICHAIN_ENABLED'] == 'true'
can :show, Registration do |registration|
registration.new_record?
end