Skip to content

Commit 25fe737

Browse files
committed
Merge branch '2.7' into 2.8
2 parents 6a01917 + 713541a commit 25fe737

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

cookbook/security/voters.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,8 @@ from the authorization checker is called.
224224
// get a Post instance
225225
$post = ...;
226226
227-
<<<<<<< HEAD
228-
$this->denyAccessUnlessGranted('view', $post, 'Unauthorized access!');
229-
=======
230227
// keep in mind that this will call all registered security voters
231-
if (false === $this->get('security.context')->isGranted('view', $post)) {
232-
throw new AccessDeniedException('Unauthorized access!');
233-
}
234-
>>>>>>> 2.3
228+
$this->denyAccessUnlessGranted('view', $post, 'Unauthorized access!');
235229
236230
return new Response('<h1>'.$post->getName().'</h1>');
237231
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy