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:
Neil Lalonde
2014-04-15 12:49:08 -04:00
parent f0e8423445
commit 91bfd47419
3 changed files with 31 additions and 2 deletions
+1 -1
View File
@@ -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)