mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-11 09:54:21 +01:00
Move site-specific configuration out of environment.rb into a YAML file. This allows us to ship environment.rb with Tracks. Fixes #813.
This commit is contained in:
parent
00e1d2994b
commit
2ee84b8162
11 changed files with 71 additions and 60 deletions
|
|
@ -48,7 +48,7 @@ module LoginSystem
|
|||
session['user_id'] = user.id
|
||||
set_current_user(user)
|
||||
current_user.remember_me
|
||||
cookies[:auth_token] = { :value => current_user.remember_token , :expires => current_user.remember_token_expires_at, :secure => TRACKS_COOKIES_SECURE }
|
||||
cookies[:auth_token] = { :value => current_user.remember_token , :expires => current_user.remember_token_expires_at, :secure => SITE_CONFIG['secure_cookies'] }
|
||||
flash[:notice] = "Logged in successfully. Welcome back!"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,20 +1,15 @@
|
|||
module Tracks
|
||||
|
||||
class Config
|
||||
|
||||
def self.salt
|
||||
SALT
|
||||
SITE_CONFIG['salt']
|
||||
end
|
||||
|
||||
def self.auth_schemes
|
||||
AUTHENTICATION_SCHEMES
|
||||
SITE_CONFIG['authentication_schemes'] || []
|
||||
end
|
||||
|
||||
def self.openid_enabled?
|
||||
auth_schemes.include?('open_id')
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue