Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
Add example of @IsGranted() with multiple roles.
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
mattjanssen committed Jul 2, 2019
1 parent 5f75c46 commit 97cc360
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/doc/annotations/security.rst
Expand Up @@ -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)
Expand Down

0 comments on commit 97cc360

Please sign in to comment.