mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
DEV: Remove deprecated whitelist methods (#22731)
These methods were deprecated and marked for removal in 2.6. This change deletes them. These deprecations use raise_error: true, so the fallbacks are at this point unreachable and can't be used anyway.
This commit is contained in:
@ -189,28 +189,10 @@ class Plugin::Instance
|
||||
end
|
||||
end
|
||||
|
||||
def whitelist_staff_user_custom_field(field)
|
||||
Discourse.deprecate(
|
||||
"whitelist_staff_user_custom_field is deprecated, use the allow_staff_user_custom_field.",
|
||||
drop_from: "2.6",
|
||||
raise_error: true,
|
||||
)
|
||||
allow_staff_user_custom_field(field)
|
||||
end
|
||||
|
||||
def allow_staff_user_custom_field(field)
|
||||
DiscoursePluginRegistry.register_staff_user_custom_field(field, self)
|
||||
end
|
||||
|
||||
def whitelist_public_user_custom_field(field)
|
||||
Discourse.deprecate(
|
||||
"whitelist_public_user_custom_field is deprecated, use the allow_public_user_custom_field.",
|
||||
drop_from: "2.6",
|
||||
raise_error: true,
|
||||
)
|
||||
allow_public_user_custom_field(field)
|
||||
end
|
||||
|
||||
def allow_public_user_custom_field(field)
|
||||
DiscoursePluginRegistry.register_public_user_custom_field(field, self)
|
||||
end
|
||||
@ -378,15 +360,6 @@ class Plugin::Instance
|
||||
end
|
||||
end
|
||||
|
||||
def topic_view_post_custom_fields_whitelister(&block)
|
||||
Discourse.deprecate(
|
||||
"topic_view_post_custom_fields_whitelister is deprecated, use the topic_view_post_custom_fields_allowlister.",
|
||||
drop_from: "2.6",
|
||||
raise_error: true,
|
||||
)
|
||||
topic_view_post_custom_fields_allowlister(&block)
|
||||
end
|
||||
|
||||
# Add a post_custom_fields_allowlister block to the TopicView, respecting if the plugin is enabled
|
||||
def topic_view_post_custom_fields_allowlister(&block)
|
||||
reloadable_patch do |plugin|
|
||||
|
Reference in New Issue
Block a user