diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-04-13 15:45:19 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-04-13 15:45:19 +0200 |
commit | f39b150a02836f620fe77e1731064b5e6e01b5b1 (patch) | |
tree | 7d900383ede698972a35d32554a9b33dae5bf957 /config | |
parent | 65a3928b0b5900872142b632b93f1937ad373e77 (diff) | |
download | gitlab-ce-f39b150a02836f620fe77e1731064b5e6e01b5b1.tar.gz |
Call your existing LDAP server 'main'
By imposing this rule we avoid having to demand that 'ldapmain' exists
in the settings initializer.
Diffstat (limited to 'config')
-rw-r--r-- | config/gitlab.yml.example | 9 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 4 |
2 files changed, 9 insertions, 4 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 e23ff1f985b..d5cddb8dbf0 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -81,10 +81,6 @@ if Settings.ldap['enabled'] || Rails.env.test? server['provider_name'] ||= "ldap#{key}".downcase server['provider_class'] = OmniAuth::Utils.camelize(server['provider_name']) end - - unless Settings.ldap['servers'].select{ |k, server| server['provider_name'] == "ldapmain"}.any? - raise "Wrong LDAP configuration. The 'main' LDAP section is missing" - end end |