From 97cc360add63a1376bbbe8e1b912c43c07640ef2 Mon Sep 17 00:00:00 2001 From: Matt Janssen Date: Tue, 2 Jul 2019 13:37:51 +0200 Subject: [PATCH] Add example of `@IsGranted()` with multiple roles. There are use cases of `@IsGranted()` where we want to check that a user has any one of multiple roles. I've seen this is two separate occasions already, especially with people migrating away from the JMSSecurityExtraBundle. Does including one example make sense? Should there be a separate sentence or paragraph pointing this out? --- Resources/doc/annotations/security.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/doc/annotations/security.rst b/Resources/doc/annotations/security.rst index 3bd40bcc..4d6ba1d6 100644 --- a/Resources/doc/annotations/security.rst +++ b/Resources/doc/annotations/security.rst @@ -34,7 +34,7 @@ on variables passed to the controller:: /** * @Route("/posts/{id}") * - * @IsGranted("ROLE_ADMIN") + * @IsGranted({"ROLE_ADMIN", "ROLE_SYSTEM"}) * @IsGranted("POST_SHOW", subject="post") */ public function show(Post $post)