Commit 4b13ca4d authored by Jacob Vosmaer's avatar Jacob Vosmaer

Normalize plugin loading

parent 85a94784
...@@ -14,11 +14,6 @@ if Gitlab::LDAP::Config.enabled? ...@@ -14,11 +14,6 @@ if Gitlab::LDAP::Config.enabled?
end end
end end
if Gitlab.config.kerberos.enabled
require 'omniauth/strategies/kerberos_spnego'
Gitlab.config.omniauth.providers << { 'name' => 'kerberos_spnego' }
end
OmniAuth.config.full_host = Settings.gitlab['base_url'] OmniAuth.config.full_host = Settings.gitlab['base_url']
OmniAuth.config.allowed_request_methods = [:post] OmniAuth.config.allowed_request_methods = [:post]
# In case of auto sign-in, the GET method is used (users don't get to click on a button) # In case of auto sign-in, the GET method is used (users don't get to click on a button)
...@@ -28,9 +23,7 @@ OmniAuth.config.before_request_phase do |env| ...@@ -28,9 +23,7 @@ OmniAuth.config.before_request_phase do |env|
end end
if Gitlab.config.omniauth.enabled if Gitlab.config.omniauth.enabled
Gitlab.config.omniauth.providers.each do |provider| provider_names = Gitlab.config.omniauth.providers.map { |p| p['name'] }
if provider['name'] == 'kerberos' require 'omniauth-kerberos' if provider_names.include?('kerberos')
require 'omniauth-kerberos' require 'omniauth/strategies/kerberos_spnego' if provider_names.include?('kerberos_spnego')
end
end
end end
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