mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 02:15:31 +08:00
fix post trashing
This commit is contained in:
@ -186,8 +186,8 @@ class PostsController < ApplicationController
|
||||
def find_post_from_params
|
||||
finder = Post.where(id: params[:id] || params[:post_id])
|
||||
|
||||
# Include deleted posts if the user is a moderator
|
||||
finder = finder.with_deleted if current_user.try(:moderator?)
|
||||
# Include deleted posts if the user is staff
|
||||
finder = finder.with_deleted if current_user.try(:staff?)
|
||||
|
||||
post = finder.first
|
||||
guardian.ensure_can_see!(post)
|
||||
|
Reference in New Issue
Block a user