@@ -1922,28 +1922,34 @@ syntax, see :doc:`/components/expression_language/syntax`.
1922
1922
1923
1923
Inside the expression, you have access to a number of variables:
1924
1924
1925
- * ``user `` The user object (or the string ``anon `` if you're not authenticated);
1926
- * ``roles `` The array of roles the user has, including from the
1927
- :ref: `role hierarchy <book-security-role-hierarchy >` but not including
1928
- the ``IS_AUTHENTICATED_* `` attributes (see the functions below);
1929
- * ``object ``: The object (if any) that's passed as the second argument to
1930
- ``isGranted `` ;
1931
- * ``token `` The token object;
1932
- * ``trust_resolver ``: The :class: `Symfony\\ Component\\ Security\\ Core\\ Authentication\\ AuthenticationTrustResolverInterface `,
1933
- object: you'll probably use the ``is_* `` functions below instead.
1925
+ ``user ``
1926
+ The user object (or the string ``anon `` if you're not authenticated).
1927
+ ``roles ``
1928
+ The array of roles the user has, including from the
1929
+ :ref: `role hierarchy <book-security-role-hierarchy >` but not including the
1930
+ ``IS_AUTHENTICATED_* `` attributes (see the functions below).
1931
+ ``object ``
1932
+ The object (if any) that's passed as the second argument to ``isGranted ``.
1933
+ ``token ``
1934
+ The token object.
1935
+ ``trust_resolver ``
1936
+ The :class: `Symfony\\ Component\\ Security\\ Core\\ Authentication\\ AuthenticationTrustResolverInterface `,
1937
+ object: you'll probably use the ``is_* `` functions below instead.
1934
1938
1935
1939
Additionally, you have access to a number of functions inside the expression:
1936
1940
1937
- * ``is_authenticated ``: Returns ``true `` if the user is authenticated via "remember-me"
1938
- or authenticated "fully" - i.e. returns true if the user is "logged in";
1939
- * ``is_anonymous ``: Equal to using ``IS_AUTHENTICATED_ANONYMOUSLY `` with
1940
- the ``isGranted `` function;
1941
- * ``is_remember_me ``: Similar, but not equal to ``IS_AUTHENTICATED_REMEMBERED ``,
1942
- see below;
1943
- * ``is_fully_authenticated ``: Similar, but not equal to ``IS_AUTHENTICATED_FULLY ``,
1944
- see below;
1945
- * ``has_role ``: Checks to see if the user has the given role - equivalent
1946
- to an expression like ``'ROLE_ADMIN' in roles ``.
1941
+ ``is_authenticated ``
1942
+ Returns ``true `` if the user is authenticated via "remember-me" or authenticated
1943
+ "fully" - i.e. returns true if the user is "logged in".
1944
+ ``is_anonymous ``
1945
+ Equal to using ``IS_AUTHENTICATED_ANONYMOUSLY `` with the ``isGranted `` function.
1946
+ ``is_remember_me ``
1947
+ Similar, but not equal to ``IS_AUTHENTICATED_REMEMBERED ``, see below.
1948
+ ``is_fully_authenticated ``
1949
+ Similar, but not equal to ``IS_AUTHENTICATED_FULLY ``, see below.
1950
+ ``has_role ``
1951
+ Checks to see if the user has the given role - equivalent to an expression like
1952
+ ``'ROLE_ADMIN' in roles ``.
1947
1953
1948
1954
.. sidebar :: ``is_remember_me`` is different than checking ``IS_AUTHENTICATED_REMEMBERED``
1949
1955
0 commit comments