Commit 3e585c01 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'require_kerberos_when_enabled' into 'master'

If kerberos is enabled require it

Since 'group: :kerberos' got [included in the Gemfile ](https://gitlab.com/gitlab-org/gitlab-ce/commit/2391a43a7073b4e723e9ca1f7ff19b30f8e51452) Kerberos no longer got [loaded when the app started](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/application.rb#L6)

This caused `Devise::OmniAuth::StrategyNotFound` error once Kerberos is enabled, failing to start GitLab .

With this we hopefully do not need to remove group from the Gemfile.

See merge request !819
parents 903132bc c6c3577b
...@@ -17,3 +17,11 @@ OmniAuth.config.allowed_request_methods << :get if Gitlab.config.omniauth.auto_s ...@@ -17,3 +17,11 @@ OmniAuth.config.allowed_request_methods << :get if Gitlab.config.omniauth.auto_s
OmniAuth.config.before_request_phase do |env| OmniAuth.config.before_request_phase do |env|
OmniAuth::RequestForgeryProtection.new(env).call OmniAuth::RequestForgeryProtection.new(env).call
end end
if Gitlab.config.omniauth.enabled
Gitlab.config.omniauth.providers.each do |provider|
if provider['name'] == 'kerberos'
require 'omniauth-kerberos'
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