Don't try to load omniauth if not enabled

This commit is contained in:
Lin Jen-Shin 2018-06-25 16:17:06 +08:00
parent ea1c5d5809
commit e62459809e
1 changed files with 3 additions and 1 deletions

View File

@ -219,5 +219,7 @@ Devise.setup do |config|
end
end
Gitlab::OmniauthInitializer.new(config).execute(Gitlab.config.omniauth.providers)
if Gitlab.config.omniauth.enabled
Gitlab::OmniauthInitializer.new(config).execute(Gitlab.config.omniauth.providers)
end
end