mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 08:17:58 -05:00
Don't show subreddits a user can't view in saved links listing.
This commit is contained in:
committed by
Chad Birch
parent
eea87be65d
commit
c49a1c399e
@@ -553,6 +553,9 @@ class UserController(ListingController):
|
||||
if self.where == 'saved' and c.user.gold:
|
||||
srnames = LinkSavesBySubreddit.get_saved_subreddits(self.vuser)
|
||||
srnames += CommentSavesBySubreddit.get_saved_subreddits(self.vuser)
|
||||
srs = Subreddit._by_name(srnames)
|
||||
srnames = [name for name, sr in srs.iteritems()
|
||||
if sr.can_view(c.user)]
|
||||
srnames = sorted(list(set(srnames)))
|
||||
if len(srnames) > 1:
|
||||
sr_buttons = [NavButton(_('all'), None, opt='sr',
|
||||
|
||||
Reference in New Issue
Block a user