diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index 3aef067c5b2..5ea2c995384 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -302,15 +302,19 @@ is_granted {{ is_granted(role, object = null, field = null) }} ``role`` - **type**: ``string`` + **type**: ``string``, ``string[]`` ``object`` *(optional)* **type**: ``object`` ``field`` *(optional)* **type**: ``string`` -Returns ``true`` if the current user has the required role. Optionally, -an object can be pasted to be used by the voter. More information can be -found in :ref:`security-template`. +Returns ``true`` if the current user has the required role, if only one +is passed; if more than one is passed, with an array, the behavior depends +on how the :ref:`Access Decision Manager ` +is configured; by default, the user has to have at least one of the passed roles. + +Optionally, an object can be pasted to be used by the voter. More information +can be found in :ref:`security-template`. .. note:: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy