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:
Krzysztof Kotlarek
2021-09-06 10:18:51 +10:00
committed by GitHub
parent 9873a942e3
commit f859fd6bde
11 changed files with 78 additions and 3 deletions

View File

@ -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|