summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-06-15 18:04:30 +0200
committerMarin Jankovski <maxlazio@gmail.com>2015-06-15 18:04:30 +0200
commit4c317531b4c23a09a4992dc8f3e2fb29f19cdeef (patch)
tree04cd29c431efac0c0faf7683fa977061dc8e8943 /config
parentcbba28bdb6dbb6eae297e7040938de06e70bc6d8 (diff)
downloadgitlab-ce-4c317531b4c23a09a4992dc8f3e2fb29f19cdeef.tar.gz
If kerberos is enabled require it.require_kerberos_when_enabled
Diffstat (limited to 'config')
-rw-r--r--config/initializers/7_omniauth.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/7_omniauth.rb b/config/initializers/7_omniauth.rb
index 6f1f267bf97..f29216a2cf1 100644
--- a/config/initializers/7_omniauth.rb
+++ b/config/initializers/7_omniauth.rb
@@ -17,3 +17,10 @@ OmniAuth.config.allowed_request_methods << :get if Gitlab.config.omniauth.auto_s
OmniAuth.config.before_request_phase do |env|
OmniAuth::RequestForgeryProtection.new(env).call
end
+
+if Gitlab.config.omniauth.enabled
+ Gitlab.config.omniauth.providers.each do |provider|
+ next unless provider['name'] == 'kerberos'
+ require 'omniauth-kerberos'
+ end
+end