Problem/Motivation
We have various views that we re-use for things that we build on top of group. For example "Manage members" or "Manage group invites". These views show data that is in the context of a specific group.
Additionally as part of #3380714: [13.0.0] Remove support for public_group, open_group, closed_group, and secret_group and migrate to flexible_group we're moving from the old group types to flexible groups. A sub-goal of that migration is to make social_group_flexible_group an optional feature which contains "Open Social's concept of a group" and to make social_group a module that "Contains tools for building on-top of the group module within an Open Social context". The idea being that Group as a module is very useful for "Collections of things with member based access controls" and we may want to build things that contain a group of users with certain levels of access but are conceptually not "an Open Social Group", for example a "Course".
Because the views mentioned provide re-usable functionality they should live in social_group. However they currently filter based on group type which causes them to have an implicit dependency on the module that provides the group type. This causes the social_group module to depend on modules it shouldn't depend on. Additionally it requires any module that wants to use the view to update the filter to add it's group bundle.
The views don't actually need to filter based on group type. The group itself is already provided as context to the view and the filter on its type thus already exists from that context.
Steps to reproduce
Proposed resolution
We should remove the bundle specific filtering from the view and instead rely on the group provided through context.
In case something built on top of the group entity doesn't want to use the view for its group-type then access handling should be used to revoke access to the view when that group is passed in as context, rather than editing the view.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | social-3421348-6-type-group.patch | 7.93 KB | ribel |
Comments
Comment #2
kingdutchhttps://github.com/goalgorilla/open_social/pull/3763
Comment #3
ribelPR was merged and will be released in version 13.0.0
Comment #4
ronaldtebrake commentedPart of 13.0.0 (alpha1)
Comment #6
ribel