Fix gravatar and ldap config

This commit is contained in:
Riyad Preukschas 2012-12-15 02:19:21 +01:00
parent 19eb637419
commit 757c7a5291
4 changed files with 14 additions and 16 deletions

View file

@ -205,20 +205,18 @@ Devise.setup do |config|
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
# end
gl = Gitlab.config
if gl.ldap_enabled?
if Gitlab.config.ldap.enabled
config.omniauth :ldap,
:host => gl.ldap['host'],
:base => gl.ldap['base'],
:uid => gl.ldap['uid'],
:port => gl.ldap['port'],
:method => gl.ldap['method'],
:bind_dn => gl.ldap['bind_dn'],
:password => gl.ldap['password']
:host => Gitlab.config.ldap['host'],
:base => Gitlab.config.ldap['base'],
:uid => Gitlab.config.ldap['uid'],
:port => Gitlab.config.ldap['port'],
:method => Gitlab.config.ldap['method'],
:bind_dn => Gitlab.config.ldap['bind_dn'],
:password => Gitlab.config.ldap['password']
end
gl.omniauth_providers.each do |gl_provider|
config.omniauth gl_provider['name'].to_sym, gl_provider['app_id'], gl_provider['app_secret']
Gitlab.config.omniauth.providers.each do |provider|
config.omniauth provider['name'].to_sym, provider['app_id'], provider['app_secret']
end
end