mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 02:51:14 +08:00
DEV: Let's always give a drop_from param to deprecate (#14901)
So that we know when deprecations can be removed in the future.
This commit is contained in:

committed by
GitHub

parent
32a174d883
commit
e7c0bbb9c0
@ -744,9 +744,9 @@ class Plugin::Instance
|
||||
provider.authenticator.enabled?
|
||||
rescue NotImplementedError
|
||||
provider.authenticator.define_singleton_method(:enabled?) do
|
||||
Discourse.deprecate("#{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.", drop_from: '2.9.0')
|
||||
return SiteSetting.get(provider.enabled_setting) if provider.enabled_setting
|
||||
Discourse.deprecate("#{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.", drop_from: '2.9.0')
|
||||
true
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user