Skip to content

Commit 82b0009

Browse files
committed
Fix how to safely use is_granted in error pages
1 parent 76a0014 commit 82b0009

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookbook/controller/error_pages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ end-user, create a new template located at
5656
by your error pages), because the router runs before the firewall. If
5757
the router throws an exception (for instance, when the route does not
5858
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+
can use ``is_granted`` safely by saying ``{% if app.user and is_granted('...') %}``.
6060

6161
.. tip::
6262

0 commit comments

Comments
 (0)