diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-13 17:18:02 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-13 17:18:02 +0300 |
commit | 4ab717ea6a65beca3e069ca8590c22c49085dc8c (patch) | |
tree | 80f163711240e5f6b7288be276c05f2df80a39ca /config | |
parent | ecb58dacd614de66c00c8df673abb96fafa5d452 (diff) | |
parent | f39b150a02836f620fe77e1731064b5e6e01b5b1 (diff) | |
download | gitlab-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')
-rw-r--r-- | config/gitlab.yml.example | 9 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 3d91b67e748..46b9f05cc17 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -105,6 +105,15 @@ production: &base ldap: enabled: false servers: + ########################################################################## + # + # Since GitLab 7.4, LDAP servers get ID's (below the ID is 'main'). GitLab + # Enterprise Edition now supports connecting to multiple LDAP servers. + # + # If you are updating from the old (pre-7.4) syntax, you MUST give your + # old server the ID 'main'. + # + ########################################################################## main: # 'main' is the GitLab 'provider ID' of this LDAP server ## label # 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'] ||= [] |