summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Willem van der Meer <mail@jewilmeer.nl>2014-10-17 18:03:34 +0200
committerJan-Willem van der Meer <mail@jewilmeer.nl>2014-10-17 18:03:34 +0200
commitd1c3864778d06b8e47b478caf4ff6f61c573151e (patch)
treec7e430f6233849f8adb0d9b390c8933137395414
parentbd9d9b6defe3c32472cf6e4af67a4c043ee129e0 (diff)
downloadgitlab-ce-d1c3864778d06b8e47b478caf4ff6f61c573151e.tar.gz
Prevent redeclaration of LDAP strategy
-rw-r--r--config/initializers/7_omniauth.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/initializers/7_omniauth.rb b/config/initializers/7_omniauth.rb
index b8ac87fbd5a..18759f0cfb0 100644
--- a/config/initializers/7_omniauth.rb
+++ b/config/initializers/7_omniauth.rb
@@ -1,7 +1,8 @@
if Gitlab::LDAP::Config.enabled?
module OmniAuth::Strategies
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
OmniauthCallbacksController.class_eval do