Skip to content

Commit d97a17c

Browse files
author
Mickaël Andrieu
authored
Fixed exemple in alternative use of isGranted annotation
1 parent e5c8d21 commit d97a17c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controller/Admin/BlogController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function new(Request $request): Response
118118
public function show(Post $post): Response
119119
{
120120
// This security check can also be performed
121-
// using an annotation: @IsGranted("show", subject="post")
121+
// using an annotation: @IsGranted("show", subject="post", message="Posts can only be shown to their authors.")
122122
$this->denyAccessUnlessGranted('show', $post, 'Posts can only be shown to their authors.');
123123

124124
return $this->render('admin/blog/show.html.twig', [

0 commit comments

Comments
 (0)