mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 19:08:13 +08:00
Fix a case when a staff user views a topic with a deleted post by a nuked user; might be a temporary solution until we decide what to do with nuked records
This commit is contained in:
@ -27,7 +27,7 @@ class TopicView
|
||||
@limit = options[:limit] || SiteSetting.posts_per_page;
|
||||
|
||||
@filtered_posts = @topic.posts
|
||||
@filtered_posts = @filtered_posts.with_deleted if user.try(:staff?)
|
||||
@filtered_posts = @filtered_posts.with_deleted.without_nuked_users if user.try(:staff?)
|
||||
@filtered_posts = @filtered_posts.best_of if options[:filter] == 'best_of'
|
||||
@filtered_posts = @filtered_posts.where('posts.post_type <> ?', Post.types[:moderator_action]) if options[:best].present?
|
||||
|
||||
|
Reference in New Issue
Block a user