summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-07-02 16:46:24 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-07-02 16:46:24 +0800
commit3b8b38fb0f6e8e6f73ac39c96a9338c5fc875f6f (patch)
treea8598ee32076663964f66463425dafe2ee1f464d /config
parent17a38b5a8b722db6f7ebf1c6eb801c63ad371880 (diff)
downloadgitlab-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 'config')
-rw-r--r--config/initializers/devise.rb2
-rw-r--r--config/initializers/omniauth.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index d051b699102..e5772c33307 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -219,7 +219,7 @@ Devise.setup do |config|
end
end
- if Gitlab.config.omniauth.enabled
+ if Gitlab::OmniauthInitializer.enabled?
Gitlab::OmniauthInitializer.new(config).execute(Gitlab.config.omniauth.providers)
end
end
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb
index a7fa926a853..c558eb28ced 100644
--- a/config/initializers/omniauth.rb
+++ b/config/initializers/omniauth.rb
@@ -17,7 +17,7 @@ OmniAuth.config.before_request_phase do |env|
Gitlab::RequestForgeryProtection.call(env)
end
-if Gitlab.config.omniauth.enabled
+if Gitlab::OmniauthInitializer.enabled?
provider_names = Gitlab.config.omniauth.providers.map(&:name)
Gitlab::Auth.omniauth_setup_providers(provider_names)
end