DEV: Include specific authenticator name in warning message

This commit is contained in:
David Taylor 2018-07-30 11:33:48 +01:00
parent 04baddf731
commit 8d1acbd4c2
1 changed files with 2 additions and 2 deletions

View File

@ -506,9 +506,9 @@ JS
provider.authenticator.enabled?
rescue NotImplementedError
provider.authenticator.define_singleton_method(:enabled?) do
Rails.logger.warn("Auth::Authenticator subclasses should define an `enabled?` function. Patching for now.")
Rails.logger.warn("#{provider.authenticator.class.name} should define an `enabled?` function. Patching for now.")
return SiteSetting.send(provider.enabled_setting) if provider.enabled_setting
Rails.logger.warn("Plugin::AuthProvider has not defined an enabled_setting. Defaulting to true.")
Rails.logger.warn("#{provider.authenticator.class.name} has not defined an enabled_setting. Defaulting to true.")
true
end
end