Prevent redeclaration of LDAP strategy
This commit is contained in:
parent
bd9d9b6def
commit
d1c3864778
1 changed files with 2 additions and 1 deletions
|
@ -1,7 +1,8 @@
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue