From 5e8935ce6646e9b75e8ebcebcc67297a0c86928e Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Wed, 3 Apr 2019 18:52:36 +0300 Subject: [PATCH] Fixing PostController::showAction() exception on private author's post. --- .../Bundle/PointToolsBundle/Controller/PostController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Controller/PostController.php b/src/Skobkin/Bundle/PointToolsBundle/Controller/PostController.php index 147d9f7..55623ea 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Controller/PostController.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Controller/PostController.php @@ -18,7 +18,7 @@ class PostController extends AbstractController public function showAction(Post $post, PostRepository $postRepository): Response { if ((!$post->getAuthor()->isPublic()) || $post->getAuthor()->isWhitelistOnly()) { - throw $this->createNotFoundException('Author\'s blog is private.'); + throw $this->createAccessDeniedException('Author\'s blog is private.'); } return $this->render('SkobkinPointToolsBundle:Post:show.html.twig', [