File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -302,15 +302,19 @@ is_granted
302302 {{ is_granted(role, object = null, field = null) }}
303303
304304 ``role ``
305- **type **: ``string ``
305+ **type **: ``string ``, `` string[] ``
306306``object `` *(optional) *
307307 **type **: ``object ``
308308``field `` *(optional) *
309309 **type **: ``string ``
310310
311- Returns ``true `` if the current user has the required role. Optionally,
312- an object can be pasted to be used by the voter. More information can be
313- found in :ref: `security-template `.
311+ Returns ``true `` if the current user has the required role, if only one
312+ is passed; if more than one is passed, with an array, the behavior depends
313+ on how the :ref: `Access Decision Manager <components-security-access-decision-manager >`
314+ is configured; by default, the user has to have at least one of the passed roles.
315+
316+ Optionally, an object can be pasted to be used by the voter. More information
317+ can be found in :ref: `security-template `.
314318
315319.. note ::
316320
You can’t perform that action at this time.
0 commit comments