FIX: properly filter whispers in user stream

This commit is contained in:
Régis Hanol
2015-09-22 00:50:52 +02:00
parent 2ae032c9b0
commit 4f7140fb32
7 changed files with 18 additions and 17 deletions

View File

@@ -147,7 +147,7 @@ module PostGuardian
return false if post.blank?
return true if is_admin?
return false unless can_see_topic?(post.topic)
return false unless post.user == @user || post.topic.visible_post_types(@user).include?(post.post_type)
return false unless post.user == @user || Topic.visible_post_types(@user).include?(post.post_type)
return false if !is_moderator? && post.deleted_at.present?
true