Prevent redeclaration of LDAP strategy

parent bd9d9b6d
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