File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -52,10 +52,11 @@ end-user, create a new template located at
52
52
53
53
.. caution ::
54
54
55
- You **must not ** use ``is_granted `` in your error pages, because the
56
- router runs before the firewall. If the router throws an exception (for
57
- instance, when the route does not match), the error page is not behind a
58
- firewall and ``app.user `` is not defined.
55
+ You **must not ** use ``is_granted `` in your error pages (or layout used
56
+ by your error pages), because the router runs before the firewall. If
57
+ the router throws an exception (for instance, when the route does not
58
+ match), then using ``is_granted `` will throw a further exception. You
59
+ can use ``is_granted `` safely by saying ``{% if app.security and is_granted('...') %} ``.
59
60
60
61
.. tip ::
61
62
You can’t perform that action at this time.
0 commit comments