Commit f39b150a authored by Jacob Vosmaer's avatar Jacob Vosmaer

Call your existing LDAP server 'main'

By imposing this rule we avoid having to demand that 'ldapmain' exists
in the settings initializer.
parent 65a3928b
...@@ -105,6 +105,15 @@ production: &base ...@@ -105,6 +105,15 @@ production: &base
ldap: ldap:
enabled: false enabled: false
servers: 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 main: # 'main' is the GitLab 'provider ID' of this LDAP server
## label ## label
# #
......
...@@ -81,10 +81,6 @@ if Settings.ldap['enabled'] || Rails.env.test? ...@@ -81,10 +81,6 @@ if Settings.ldap['enabled'] || Rails.env.test?
server['provider_name'] ||= "ldap#{key}".downcase server['provider_name'] ||= "ldap#{key}".downcase
server['provider_class'] = OmniAuth::Utils.camelize(server['provider_name']) server['provider_class'] = OmniAuth::Utils.camelize(server['provider_name'])
end 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 end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment