Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-07-13 13:39:31 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-07-20 13:54:46 +0300
commitd0afab482f1157d0b41631cb4dbdfdfeadabb7c8 (patch)
tree5ac1f6769b6ee311878d0c7d2960414c26ce7f54 /app/controllers/sessions_controller.rb
parent8895863cf340a8a6c9a708dc864af77fe48beaaa (diff)
Disable SAML if OmniAuth is disabled
We also try to unify the way we setup OmniAuth, and how we check if it's enabled or not.
Diffstat (limited to 'app/controllers/sessions_controller.rb')
-rw-r--r--app/controllers/sessions_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index 9dd652206fe..4ca42e2d4a2 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -157,6 +157,8 @@ class SessionsController < Devise::SessionsController
end
def auto_sign_in_with_provider
+ return unless Gitlab::Auth.omniauth_enabled?
+
provider = Gitlab.config.omniauth.auto_sign_in_with_provider
return unless provider.present?