BUGFIX: history link doesn't work on deleted posts
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ class Guardian
|
||||
include CategoryGuardian
|
||||
include PostGuardain
|
||||
include TopicGuardian
|
||||
|
||||
|
||||
class AnonymousUser
|
||||
def blank?; true; end
|
||||
def admin?; false; end
|
||||
|
||||
@@ -104,7 +104,9 @@ module PostGuardain
|
||||
end
|
||||
|
||||
def can_see_post_revision?(post_revision)
|
||||
post_revision.present? && (is_staff? || can_see_post?(post_revision.post))
|
||||
return false if post_revision.nil?
|
||||
return true if SiteSetting.edit_history_visible_to_public
|
||||
authenticated? && (is_staff? || can_see_post?(post_revision.post))
|
||||
end
|
||||
|
||||
def can_vote?(post, opts={})
|
||||
|
||||
Reference in New Issue
Block a user