mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-03 22:41:48 +01:00
make functional tests for context controller run
This commit is contained in:
parent
76340b780c
commit
59a4d5ede0
10 changed files with 225 additions and 182 deletions
27
lib/tracks/config.rb
Normal file
27
lib/tracks/config.rb
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
module Tracks
|
||||
class Config
|
||||
def self.salt
|
||||
SITE_CONFIG['salt']
|
||||
end
|
||||
|
||||
def self.auth_schemes
|
||||
SITE_CONFIG['authentication_schemes'] || []
|
||||
end
|
||||
|
||||
def self.openid_enabled?
|
||||
auth_schemes.include?('open_id')
|
||||
end
|
||||
|
||||
def self.cas_enabled?
|
||||
auth_schemes.include?('cas')
|
||||
end
|
||||
|
||||
def self.prefered_auth?
|
||||
if SITE_CONFIG['prefered_auth']
|
||||
SITE_CONFIG['prefered_auth']
|
||||
else
|
||||
auth_schemes.first
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue