DEV: Added callback to change the query used to filter groups in search (#19884)

Added plugin registry that will allow adding callbacks that can change the query that is used
to filter groups while running a search.
This commit is contained in:
Sérgio Saquetim
2023-01-16 15:48:00 -03:00
committed by GitHub
parent 55d344a934
commit 0feb9ad341
4 changed files with 74 additions and 11 deletions

View File

@ -1292,6 +1292,10 @@ class Plugin::Instance
DiscoursePluginRegistry.register_topic_preloader_association(fields, self)
end
def register_search_group_query_callback(callback)
DiscoursePluginRegistry.register_search_groups_set_query_callback(callback, self)
end
private
def validate_directory_column_name(column_name)