mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 10:31:10 +08:00
FIX: Use Discourse.deprecate
instead of Rails.logger.warn
This will significantly reduce the volume of logs when the condition is hit
This commit is contained in:
@ -497,9 +497,9 @@ class Plugin::Instance
|
|||||||
provider.authenticator.enabled?
|
provider.authenticator.enabled?
|
||||||
rescue NotImplementedError
|
rescue NotImplementedError
|
||||||
provider.authenticator.define_singleton_method(:enabled?) do
|
provider.authenticator.define_singleton_method(:enabled?) do
|
||||||
Rails.logger.warn("#{provider.authenticator.class.name} should define an `enabled?` function. Patching for now.")
|
Discourse.deprecate("#{provider.authenticator.class.name} should define an `enabled?` function. Patching for now.")
|
||||||
return SiteSetting.send(provider.enabled_setting) if provider.enabled_setting
|
return SiteSetting.send(provider.enabled_setting) if provider.enabled_setting
|
||||||
Rails.logger.warn("#{provider.authenticator.class.name} has not defined an enabled_setting. Defaulting to true.")
|
Discourse.deprecate("#{provider.authenticator.class.name} has not defined an enabled_setting. Defaulting to true.")
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user