diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-07-06 13:06:48 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-07-06 13:06:48 +0300 |
commit | b0fa01fce3822da94aee6264829841996beb6df3 (patch) | |
tree | f4a317c05d8536368da398ae495ab7506b5b649c /lib | |
parent | afb3caac797f5c90af9ff4989a3730299d39e3f1 (diff) | |
parent | 772be582d1aad0481b67ad552703035ce7dd1fd8 (diff) |
Merge branch '48677-also-check-auto_sign_in_with_provider' into 'master'
Resolve "Undefined omniauth_authorize_path when omniauth_enabled not enabled"
Closes #48677
See merge request gitlab-org/gitlab-ce!20302
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/omniauth_initializer.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/omniauth_initializer.rb b/lib/gitlab/omniauth_initializer.rb index 35ed3a5ac05..a71acda8701 100644 --- a/lib/gitlab/omniauth_initializer.rb +++ b/lib/gitlab/omniauth_initializer.rb @@ -1,5 +1,10 @@ module Gitlab class OmniauthInitializer + def self.enabled? + Gitlab.config.omniauth.enabled || + Gitlab.config.omniauth.auto_sign_in_with_provider.present? + end + def initialize(devise_config) @devise_config = devise_config end |