mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-05-20 09:18:19 +00:00
use privacy__in to respect shelf privacy settings
This commit is contained in:
parent
e3ca543f8e
commit
5b8e083bcd
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue