diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-07-23 07:48:00 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-07-23 07:48:00 +0000 |
commit | 8bc7845fbf424b9f451247459dcb3a8bbe953242 (patch) | |
tree | c379386a488bbbf34244880624742fc09c2baea9 /config | |
parent | 10698db7aa0979a5c6e7cadc5eadc69b8c86f58c (diff) | |
parent | d0afab482f1157d0b41631cb4dbdfdfeadabb7c8 (diff) | |
download | gitlab-ce-8bc7845fbf424b9f451247459dcb3a8bbe953242.tar.gz |
Merge branch '48932-disable-saml-if-omniauth-is-disabled' into 'master'
Resolve "Disable SAML and Bitbucket if OmniAuth is disabled"
Closes #48932
See merge request gitlab-org/gitlab-ce!20608
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/devise.rb | 2 | ||||
-rw-r--r-- | config/initializers/omniauth.rb | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index e5772c33307..c41b2db722c 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -219,7 +219,7 @@ Devise.setup do |config| end end - if Gitlab::OmniauthInitializer.enabled? + if Gitlab::Auth.omniauth_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 c558eb28ced..ef23ca065c6 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -16,8 +16,3 @@ OmniAuth.config.allowed_request_methods << :get if Gitlab.config.omniauth.auto_s OmniAuth.config.before_request_phase do |env| Gitlab::RequestForgeryProtection.call(env) end - -if Gitlab::OmniauthInitializer.enabled? - provider_names = Gitlab.config.omniauth.providers.map(&:name) - Gitlab::Auth.omniauth_setup_providers(provider_names) -end |