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
302
302
{{ is_granted(role, object = null, field = null) }}
303
303
304
304
``role ``
305
- **type **: ``string ``
305
+ **type **: ``string ``, `` string[] ``
306
306
``object `` *(optional) *
307
307
**type **: ``object ``
308
308
``field `` *(optional) *
309
309
**type **: ``string ``
310
310
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 `.
314
318
315
319
.. note ::
316
320
You can’t perform that action at this time.
0 commit comments