diff options
author | Andrei Gliga <otzy_007@yahoo.com> | 2016-05-04 13:35:03 +0300 |
---|---|---|
committer | Andrei Gliga <otzy_007@yahoo.com> | 2016-05-12 13:44:46 +0300 |
commit | 8d26836e945f3e66a46370905b9fb34244a0ff91 (patch) | |
tree | a0d1882ce3cf8d29d0bf0df4eef7127d2ee102e0 /app/helpers | |
parent | cf300443147f1a9ba3acf83ce839afdffa5173bd (diff) |
method to get the enabled_button_based_providers
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/auth_helper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb index b4f80fd9b3e..24eb813d0ba 100644 --- a/app/helpers/auth_helper.rb +++ b/app/helpers/auth_helper.rb @@ -38,6 +38,12 @@ module AuthHelper auth_providers.reject { |provider| form_based_provider?(provider) } end + def enabled_button_based_providers + disabled_providers = current_application_settings.disabled_oauth_sign_in_sources || [] + + button_based_providers.map(&:to_s) - disabled_providers + end + def provider_image_tag(provider, size = 64) label = label_for_provider(provider) |