We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdfd1ad commit 577dfa2Copy full SHA for 577dfa2
security/voters.rst
@@ -40,11 +40,10 @@ For more information take a look at
40
to create the correct response::
41
42
// src/AppBundle/Controller/PostController.php
43
- use Symfony\Component\Security\Core\Exception\AccessDeniedException;
44
-
45
// ...
+
46
if ($post->getOwner() !== $this->getUser()) {
47
- throw new AccessDeniedException();
+ throw $this-> createAccessDeniedException();
48
}
49
50
The Voter Interface
0 commit comments