mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 01:14:29 +08:00
Refactor flag types for more customization
This commit is contained in:
@ -90,6 +90,15 @@ class Plugin::Instance
|
||||
end
|
||||
end
|
||||
|
||||
def replace_flags
|
||||
settings = ::FlagSettings.new
|
||||
yield settings
|
||||
|
||||
reloadable_patch do |plugin|
|
||||
::PostActionType.replace_flag_settings(settings) if plugin.enabled?
|
||||
end
|
||||
end
|
||||
|
||||
def whitelist_staff_user_custom_field(field)
|
||||
reloadable_patch do |plugin|
|
||||
::User.register_plugin_staff_custom_field(field, plugin) if plugin.enabled?
|
||||
|
Reference in New Issue
Block a user