diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-16 12:46:48 +0000 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-06-16 15:14:54 +0200 |
commit | 940d38b065e77ba2abcc21375c439f899450f852 (patch) | |
tree | f5e0b778a63dfa8210edeee02d6a2c50dc58dcb2 | |
parent | 5701879f73b5999a1e91129d95898599779b1601 (diff) | |
download | gitlab-ce-940d38b065e77ba2abcc21375c439f899450f852.tar.gz |
Merge branch 'require_kerberos_when_enabled' into 'master'kerberos_require
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
-rw-r--r-- | config/initializers/7_omniauth.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/initializers/7_omniauth.rb b/config/initializers/7_omniauth.rb index 6f1f267bf97..df73ec1304a 100644 --- a/config/initializers/7_omniauth.rb +++ b/config/initializers/7_omniauth.rb @@ -17,3 +17,11 @@ 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| + if provider['name'] == 'kerberos' + require 'omniauth-kerberos' + end + end +end |