mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FEATURE: allow plugins to extend Groups (#14216)
* add_permitted_group_param API for plugins * add groups-interaction-custom-options outlet * custom search can use custom group scope
This commit is contained in:

committed by
GitHub

parent
9873a942e3
commit
f859fd6bde
@ -1123,7 +1123,12 @@ class UsersController < ApplicationController
|
||||
end
|
||||
|
||||
if groups
|
||||
groups = Group.search_groups(term, groups: groups)
|
||||
groups = Group.search_groups(term,
|
||||
groups: groups,
|
||||
custom_scope: {
|
||||
name: params["custom_groups_scope"]&.to_sym,
|
||||
arguments: [current_user]
|
||||
})
|
||||
groups = groups.order('groups.name asc')
|
||||
|
||||
to_render[:groups] = groups.map do |m|
|
||||
|
Reference in New Issue
Block a user