mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 19:53:53 -06:00
741e9d70ad
In TopicController, in addition to ensure_can_move_posts!, we also checked if the topic is private message in this line: ```ruby raise Discourse::InvalidAccess if params[:archetype] == "private_message" && !guardian.is_staff? ``` However, this was not present in `guardian.can_move_posts?`. As a result, the frontend topic view got an incorrect serialized result, thinking that TL4 could move the private message post. In fact, once they tried to move it, they got the `InvalidAccess` error message. This commit fixes that TL4 will no longer sees the "move to" option in the "select post" panel for a private message. |
||
---|---|---|
.. | ||
bookmark_guardian.rb | ||
category_guardian.rb | ||
ensure_magic.rb | ||
flag_guardian.rb | ||
group_guardian.rb | ||
post_guardian.rb | ||
post_revision_guardian.rb | ||
sidebar_guardian.rb | ||
tag_guardian.rb | ||
topic_guardian.rb | ||
user_guardian.rb |