Allow post author to see their own deleted post

closes flarum/core#225
This commit is contained in:
Toby Zerner 2015-08-13 13:02:13 +09:30
parent ae57be6e4f
commit 150a9b316d

View File

@ -34,7 +34,7 @@ class PostsServiceProvider extends ServiceProvider
$actor = $event->actor;
if ($action === 'view' &&
(! $post->hide_user_id || $post->can($actor, 'edit'))) {
(! $post->hide_user_id || $post->hide_user_id == $actor->id || $post->can($actor, 'edit'))) {
return true;
}