summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/sessions_controller.rb2
-rw-r--r--app/helpers/auth_helper.rb2
-rw-r--r--app/views/admin/dashboard/index.html.haml4
3 files changed, 5 insertions, 3 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?
diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb
index d2daee22aba..18f0979fc86 100644
--- a/app/helpers/auth_helper.rb
+++ b/app/helpers/auth_helper.rb
@@ -7,7 +7,7 @@ module AuthHelper
end
def omniauth_enabled?
- Gitlab.config.omniauth.enabled
+ Gitlab::Auth.omniauth_enabled?
end
def provider_has_icon?(name)
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml
index 18f2c1a509f..fac61f9d249 100644
--- a/app/views/admin/dashboard/index.html.haml
+++ b/app/views/admin/dashboard/index.html.haml
@@ -91,10 +91,10 @@
%span.light.float-right
= boolean_to_icon gravatar_enabled?
- omniauth = "OmniAuth"
- %p{ "aria-label" => "#{omniauth}: status " + (Gitlab.config.omniauth.enabled ? "on" : "off") }
+ %p{ "aria-label" => "#{omniauth}: status " + (Gitlab::Auth.omniauth_enabled? ? "on" : "off") }
= omniauth
%span.light.float-right
- = boolean_to_icon Gitlab.config.omniauth.enabled
+ = boolean_to_icon Gitlab::Auth.omniauth_enabled?
- reply_email = "Reply by email"
%p{ "aria-label" => "#{reply_email}: status " + (Gitlab::IncomingEmail.enabled? ? "on" : "off") }
= reply_email