Fixing automatic replacing of AccessDeniedExceptions with InsufficientAuthenticationException in Symfony\Component\Security\Http\Firewall\ExceptionListener::handleAccessDeniedException().
This commit is contained in:
parent
aa751bbbc1
commit
44c4158602
|
@ -9,4 +9,11 @@ security:
|
||||||
security: false
|
security: false
|
||||||
|
|
||||||
default:
|
default:
|
||||||
anonymous: ~
|
# Needs to be changed if authentication is added
|
||||||
|
# Also it needs to be carefully checked that after enabling security here
|
||||||
|
# \Symfony\Component\Security\Http\Firewall\ExceptionListener::handleAccessDeniedException() doesn't start to replace 403 by 401 exceptions
|
||||||
|
# for all users
|
||||||
|
# For example \Skobkin\Bundle\PointToolsBundle\Controller\PostController::showAction() can return AccessDeniedException and this logic must be saved
|
||||||
|
# After enabling authentication
|
||||||
|
security: false
|
||||||
|
#anonymous: true
|
||||||
|
|
|
@ -12,8 +12,6 @@ class PostController extends AbstractController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @ParamConverter("post", class="SkobkinPointToolsBundle:Blogs\Post")
|
* @ParamConverter("post", class="SkobkinPointToolsBundle:Blogs\Post")
|
||||||
*
|
|
||||||
* @return Response
|
|
||||||
*/
|
*/
|
||||||
public function showAction(Post $post, PostRepository $postRepository): Response
|
public function showAction(Post $post, PostRepository $postRepository): Response
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue