From 5b8e083bcdcb2b1493855a60a39f6824571d41e2 Mon Sep 17 00:00:00 2001 From: mattkatz Date: Tue, 12 Mar 2024 22:10:18 -0400 Subject: [PATCH] use privacy__in to respect shelf privacy settings --- bookwyrm/views/rss_feed.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bookwyrm/views/rss_feed.py b/bookwyrm/views/rss_feed.py index daca6efa0..cd7604b71 100644 --- a/bookwyrm/views/rss_feed.py +++ b/bookwyrm/views/rss_feed.py @@ -200,10 +200,12 @@ class RssShelfFeed(Feed): """the shelf that gets serialized""" user = get_user_from_username(request.user, username) # always get privacy, don't support rss over anything private - # Shelf.privacy_filter(request.user).filter(user=user).all() - - # TODO: get the SHELF of the object - shelf = get_object_or_404(user.shelf_set, identifier=shelf_identifier) + # get the SHELF of the object + shelf = get_object_or_404( + user.shelf_set, + identifier=shelf_identifier, + privacy__in=["public", "unlisted"], + ) shelf.raise_visible_to_user(request.user) return shelf