BUGFIX: edit history on wiki posts should be visible

This commit is contained in:
Régis Hanol
2014-06-26 19:19:35 +02:00
parent 07cb3aff97
commit ee1d78c73e
2 changed files with 40 additions and 12 deletions

View File

@@ -135,7 +135,10 @@ module PostGuardian
def can_view_post_revisions?(post)
return false unless post
return true if SiteSetting.edit_history_visible_to_public && !post.hidden
if !post.hidden
return true if post.wiki || SiteSetting.edit_history_visible_to_public
end
authenticated? &&
(is_staff? || @user.has_trust_level?(:elder) || @user.id == post.user_id) &&