From 713541a5151334aaab1d48892ba6803aac6c3add Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 24 Sep 2015 08:14:18 +0200 Subject: [PATCH] fix a broken merge --- cookbook/security/voters.rst | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cookbook/security/voters.rst b/cookbook/security/voters.rst index 9c980c38f6c..ec5404ef2a9 100644 --- a/cookbook/security/voters.rst +++ b/cookbook/security/voters.rst @@ -224,14 +224,8 @@ from the authorization checker is called. // get a Post instance $post = ...; -<<<<<<< HEAD - $this->denyAccessUnlessGranted('view', $post, 'Unauthorized access!'); -======= // keep in mind that this will call all registered security voters - if (false === $this->get('security.context')->isGranted('view', $post)) { - throw new AccessDeniedException('Unauthorized access!'); - } ->>>>>>> 2.3 + $this->denyAccessUnlessGranted('view', $post, 'Unauthorized access!'); return new Response('

'.$post->getName().'

'); }