Bookmark issue when access to topic is lost (PMs)

(Joshua Rosenfeld) #1

Earlier I bookmarked a topic that was later moved to PM, which I was not a part of. The post still appears on my bookmark list, but I am unable to see the full post, nor can I remove the bookmark. Speaking with @sam, he confirmed that the same issue would occur if I bookmarked something in a PM but subsequently lost access.

Relevant js errors when clicking remove bookmark:

(Jeff Atwood) #2

@tgxworld can you make sure remove bookmark at least works in this scenario? Having a forever bookmark to something you can’t ever see is definitely annoying.

(Joshua Rosenfeld) #3

While having the remove bookmark button work is a great first step, I think it would be better if the bookmark was removed automatically. Clicking on a bookmark and seeing “this topic doesn’t exist” is a bit jarring.

(Jeff Atwood) #4

I think a simple fix is desirable here first.

(Sam Saffron) #5

I would prefer this be fixed, not doing proper access control in bookmark list is a security concern. The unbookmark button then does not need to be touched, lose access and it should vanish.

(Alan Tan) #7

@jomaxro Based on my testing locally, this only happens when you’ve already loaded the page with the stream of bookmarks and someone removes your permission to view one of the posts in the stream. Once you refresh the page, the stream will no longer include the bookmarks.

This is not easy to implement from what I’ve gathered. There are many actions that can result in a user losing permission to a topic/post and we need to have those actions publish updates to the clients. Our topic list actually works this way as well, only new topics are pushed to the clients but a topic that has been deleted will still remain in the stream and clicking on it will direct the user to a topic not found page.

In order to make it less confusing, I’ve submitted a PR to allow a user to remove their own bookmarks even if permission to see the post has been removed.

(Alan Tan) #8