fix post trashing

This commit is contained in:
Sam
2013-05-07 17:56:56 +10:00
parent a232e77fa8
commit 20493106cd
2 changed files with 3 additions and 3 deletions

View File

@ -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)