Commit 8beca98d authored by Jacob Vosmaer's avatar Jacob Vosmaer

Fix CE-EE LDAP merge conflicts

parent e7698225
......@@ -61,24 +61,16 @@ Settings.ldap['sync_time'] = 3600 if Settings.ldap['sync_time'].nil?
if Settings.ldap['enabled'] || Rails.env.test?
if Settings.ldap['host'].present?
server = Settings.ldap.except('sync_time')
<<<<<<< HEAD
server = Settingslogic.new(server)
server['label'] = 'LDAP'
=======
>>>>>>> 7-4-stable
server['provider_name'] = 'ldap'
Settings.ldap['servers'] = {
'ldap' => server
}
end
<<<<<<< HEAD
Settings.ldap['servers'].map do |key, server|
server = Settingslogic.new(server)
=======
Settings.ldap['servers'].each do |key, server|
server = Settingslogic.new(server)
server['label'] ||= 'LDAP'
>>>>>>> 7-4-stable
server['allow_username_or_email_login'] = false if server['allow_username_or_email_login'].nil?
server['active_directory'] = true if server['active_directory'].nil?
server['provider_name'] ||= "ldap#{key}".downcase
......
if Gitlab::LDAP::Config.enabled?
module OmniAuth::Strategies
<<<<<<< HEAD
Gitlab::LDAP::Config.servers.each do |server|
# do not redeclare LDAP
next if server['provider_name'] == 'ldap'
const_set(server['provider_class'], Class.new(LDAP))
end
=======
server = Gitlab.config.ldap.servers.values.first
klass = server['provider_class']
const_set(klass, Class.new(LDAP)) unless klass == 'LDAP'
>>>>>>> 7-4-stable
end
OmniauthCallbacksController.class_eval do
......
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