mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 08:07:40 +08:00

Reported here: https://meta.discourse.org/t/quoting-a-closed-topic-prefills-category-in-composer-that-should-be-off-limits/260009 Currently, if someone tries to quote a topic they don't have permission to reply to, we'll open a new topic composer with the quote so they can "continue the discussion". When doing this, we populate the current category, even if the user doesn't have permission to post in it. This is misleading, as when the user attempts to submit their topic they get an error because they lack the category permissions. This change checks the category permissions before populating it.