mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 11:45:21 -05:00
FIX: don't show contents of hidden posts when quoting the post and when replying as new topic. Also don't allow public to view edit history of hidden posts.
This commit is contained in:
@@ -116,7 +116,7 @@ module PostGuardain
|
||||
|
||||
def can_view_post_revisions?(post)
|
||||
return false if post.nil?
|
||||
return true if SiteSetting.edit_history_visible_to_public
|
||||
return true if SiteSetting.edit_history_visible_to_public && !post.hidden
|
||||
authenticated? &&
|
||||
(is_staff? || @user.has_trust_level?(:elder) || @user.id == post.user_id) &&
|
||||
can_see_post?(post)
|
||||
|
||||
Reference in New Issue
Block a user