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:
Diffstat (limited to 'app/helpers/auth_helper.rb')
-rw-r--r--app/helpers/auth_helper.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb
index fc157df3891..e447940e2af 100644
--- a/app/helpers/auth_helper.rb
+++ b/app/helpers/auth_helper.rb
@@ -93,16 +93,11 @@ module AuthHelper
end
def saml_providers
- auth_providers.select do |provider|
- provider == :saml || auth_strategy_class(provider) == 'OmniAuth::Strategies::SAML'
+ providers = Gitlab.config.omniauth.providers.select do |provider|
+ provider.name == 'saml' || provider.dig('args', 'strategy_class') == 'OmniAuth::Strategies::SAML'
end
- end
-
- def auth_strategy_class(provider)
- config = Gitlab::Auth::OAuth::Provider.config_for(provider)
- return if config.nil? || config['args'].blank?
- config.args['strategy_class']
+ providers.map(&:name).map(&:to_sym)
end
def any_form_based_providers_enabled?