FEATURE: allow plugins to extend Groups (PR #14216)

This PR contains 3 features. Each one is a separate commit to make it easier to review:

  1. Allow plugins to define permitted parameter for groups. If a plugin is adding a column to the groups table, we need to allow plugins to permit those new parameters to create/update Group.
  2. Outlet groups-interaction-custom-options for group interaction fields. Plugin can add new fields to the Group form
  3. User chooser can have a custom scope to filter returned groups


Is it possible to avoid using mocks here? Is there some state that we can test for to ensure that the method is not called?

I think the API should be exposed on the GroupsController instead.

I’m not sure how DiscoursePluginRegistry works but we seem to have a pattern for adding more permitted params. Can we see if we can extend that instead?

On line 725, I see

I think this is going to leak state since we don’t clear the class attribute.

I think it’ll be helpful to point out which controllers are affected here.

Are plugins expected to pass in the param here? I kind of feel like the interface that we add here should be in Group.search_groups.