Skip to content

Conversation

@escattone
Copy link
Contributor

@escattone escattone commented Jan 16, 2026

mozilla/sumo#2718

This PR builds a bit on #7177:

  • Adds a GroupProfile.filter_by_visible method that encapsulates the visibility filtering in a way that can be used for filtering Group queries as well as GroupProfile queries.
  • Adjusts the PRIVATE visibility to include leaders as well as group members.
  • Assumes that Group objects without an associated profile are always public.
  • Adjusts the can_edit method to use get_ancestors in order to avoid the possibility of multiple get_parent queries.
  • Adds a group-profile manager with the visible method for convenience.
  • Uses the new methods within the groups views and the users profile view to restrict visibility to the groups involved.

Questions

@escattone escattone changed the title add method for filtering by visible add method for filtering groups and group profiles by visibility Jan 16, 2026
@escattone escattone requested a review from akatsoulas January 16, 2026 00:23
@escattone escattone force-pushed the visibility-filtering branch from cbca2ea to f5c08f4 Compare January 16, 2026 00:42
@escattone escattone changed the title add method for filtering groups and group profiles by visibility visibility filtering for groups and group profiles Jan 16, 2026
@escattone escattone force-pushed the visibility-filtering branch 10 times, most recently from a0be3f5 to b205d40 Compare January 18, 2026 00:20
@escattone escattone force-pushed the visibility-filtering branch from b205d40 to 1ea132c Compare January 18, 2026 00:30
@akatsoulas akatsoulas merged commit 1ea132c into mozilla:main Jan 19, 2026
1 of 2 checks passed
@escattone escattone deleted the visibility-filtering branch January 20, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants