提交 f39b150a 编写于 作者: J Jacob Vosmaer

Call your existing LDAP server 'main'

By imposing this rule we avoid having to demand that 'ldapmain' exists
in the settings initializer.
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册