Commit 49bd9812 authored by Jan-Willem van der Meer's avatar Jan-Willem van der Meer Committed by Dmitriy Zaporozhets

Prevent redeclaration of LDAP strategy

parent 644fd232
if Gitlab::LDAP::Config.enabled? if Gitlab::LDAP::Config.enabled?
module OmniAuth::Strategies module OmniAuth::Strategies
server = Gitlab.config.ldap.servers.values.first server = Gitlab.config.ldap.servers.values.first
const_set(server['provider_class'], Class.new(LDAP)) klass = server['provider_class']
const_set(klass, Class.new(LDAP)) unless klass == 'LDAP'
end end
OmniauthCallbacksController.class_eval do 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