diff --git a/cookbook/security/voters.rst b/cookbook/security/voters.rst index 9a2a4c6a244..db56fb9af2e 100644 --- a/cookbook/security/voters.rst +++ b/cookbook/security/voters.rst @@ -224,8 +224,6 @@ from the authorization checker is called. // get a Post instance $post = ...; - $authChecker = $this->get('security.authorization_checker'); - $this->denyAccessUnlessGranted('view', $post, 'Unauthorized access!'); return new Response('