Commit 52acea0
committed
minor #11420 Fixing broken sentence (ThomasLandauer)
This PR was merged into the 4.2 branch.
Discussion
----------
Fixing broken sentence
Basically resetting it to where it was in v3.4: https://symfony.com/doc/3.4/security.html#access-control-in-templates
Questions:
1. Is there an easy way to check if access is granted to the *current* user (without hard-coding the role)? Anything shorter than:?
```twig
{% for role in app.user.roles|default(null) %}
{% if is_granted(role) %}
...
{% endif %}
{% endfor %}
```
2. For building a "dynamic" navbar, it would be nice to check if a certain *path* is accessible by the current user. Is this possible?
Commits
-------
33bcdea Fixing broken sentence1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
605 | | - | |
606 | | - | |
| 605 | + | |
| 606 | + | |
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| |||
0 commit comments