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 16e475e commit 1799a49Copy full SHA for 1799a49
security/voters.rst
@@ -105,7 +105,7 @@ code like this:
105
public function show(Post $post): Response
106
{
107
// check for "view" access: calls all voters
108
- $this->denyAccessUnlessGranted('view', $post);
+ $this->denyAccessUnlessGranted('PostVoter::VIEW', $post);
109
110
// ...
111
}
@@ -114,7 +114,7 @@ code like this:
114
public function edit(Post $post): Response
115
116
// check for "edit" access: calls all voters
117
- $this->denyAccessUnlessGranted('edit', $post);
+ $this->denyAccessUnlessGranted(PostVoter::EDIT, $post);
118
119
120
0 commit comments