diff options
| author | Lin Jen-Shin <godfat@godfat.org> | 2018-07-02 16:46:24 +0800 |
|---|---|---|
| committer | Lin Jen-Shin <godfat@godfat.org> | 2018-07-02 16:46:24 +0800 |
| commit | 3b8b38fb0f6e8e6f73ac39c96a9338c5fc875f6f (patch) | |
| tree | a8598ee32076663964f66463425dafe2ee1f464d /lib | |
| parent | 17a38b5a8b722db6f7ebf1c6eb801c63ad371880 (diff) | |
| download | gitlab-ce-3b8b38fb0f6e8e6f73ac39c96a9338c5fc875f6f.tar.gz | |
If `omniauth_auto_sign_in_with_provider` is set,
it also means we're using omniauth, so we need to set it up.
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 |
