diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-04-13 11:50:44 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-04-13 11:50:44 +0200 |
commit | ec7a68a1a5c7df1a1710eb1df31e410f6c171289 (patch) | |
tree | b1b4e7139f771f819316d3ec9fecb52677e3db93 /config/initializers | |
parent | 8b4705fea6297a23f708c59cbce3c8a3115128c0 (diff) | |
download | gitlab-ce-ec7a68a1a5c7df1a1710eb1df31e410f6c171289.tar.gz |
Simplify legacy LDAP config interpretation
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/1_settings.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index c25c799d8f6..e23ff1f985b 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'] = 'ldapmain' Settings.ldap['servers'] = { - 'ldap' => server + 'main' => server } end |