BigW Consortium Gitlab

Commit f39b150a by 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
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
#
......
......@@ -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
......
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