summaryrefslogtreecommitdiff
path: root/config/initializers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-13 17:18:02 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-13 17:18:02 +0300
commit4ab717ea6a65beca3e069ca8590c22c49085dc8c (patch)
tree80f163711240e5f6b7288be276c05f2df80a39ca /config/initializers
parentecb58dacd614de66c00c8df673abb96fafa5d452 (diff)
parentf39b150a02836f620fe77e1731064b5e6e01b5b1 (diff)
downloadgitlab-ce-4ab717ea6a65beca3e069ca8590c22c49085dc8c.tar.gz
Merge branch 'ldap_migration'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: db/schema.rb
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/1_settings.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index e6b00c531ac..d5cddb8dbf0 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -66,10 +66,11 @@ Settings.ldap['enabled'] = false if Settings.ldap['enabled'].nil?
# backwards compatibility, we only have one host
if Settings.ldap['enabled'] || Rails.env.test?
if Settings.ldap['host'].present?
+ # We detected old LDAP configuration syntax. Update the config to make it
+ # look like it was entered with the new syntax.
server = Settings.ldap.except('sync_time')
- server['provider_name'] = 'ldap'
Settings.ldap['servers'] = {
- 'ldap' => server
+ 'main' => server
}
end
@@ -82,6 +83,7 @@ if Settings.ldap['enabled'] || Rails.env.test?
end
end
+
Settings['omniauth'] ||= Settingslogic.new({})
Settings.omniauth['enabled'] = false if Settings.omniauth['enabled'].nil?
Settings.omniauth['providers'] ||= []