994
994
),
995
995
996
996
In this case, when the user tries to access any URL starting with ``/_internal/secure ``,
997
- she will only be granted access if the IP address is ``127.0.0.1 `` or if
997
+ they will only be granted access if the IP address is ``127.0.0.1 `` or if
998
998
the user has the ``ROLE_ADMIN `` role.
999
999
1000
1000
Inside the expression, you have access to a number of different variables
@@ -1966,10 +1966,12 @@ accepts an :class:`Symfony\\Component\\ExpressionLanguage\\Expression` object::
1966
1966
}
1967
1967
1968
1968
In this example, if the current user has ``ROLE_ADMIN `` or if the current
1969
- user object's ``isSuperAdmin `` method returns ``true ``, then access will
1969
+ user object's ``isSuperAdmin() `` method returns ``true ``, then access will
1970
1970
be granted (note: your User object may not have an ``isSuperAdmin `` method,
1971
- that method is invented for this example). This uses an expression and you
1972
- can learn more about the expression language syntax, see :doc: `/components/expression_language/syntax `.
1971
+ that method is invented for this example).
1972
+
1973
+ This uses an expression and you can learn more about the expression language
1974
+ syntax, see :doc: `/components/expression_language/syntax `.
1973
1975
1974
1976
.. _book-security-expression-variables :
1975
1977
@@ -1985,11 +1987,9 @@ Inside the expression, you have access to a number of variables:
1985
1987
* ``trust_resolver ``: The :class: `Symfony\\ Component\\ Security\\ Core\\ Authentication\\ AuthenticationTrustResolverInterface `,
1986
1988
object: you'll probably use the ``is_* `` functions below instead.
1987
1989
1988
- Additionally, you have access to a number of functions inside the expression.
1989
- **Note **: some of these functions *look * similar to the ``IS_AUTHENTICATED_* ``
1990
- attributes, but work differently. See the note below:
1990
+ Additionally, you have access to a number of functions inside the expression:
1991
1991
1992
- * ``is_authenticated ``: Returns true if the user is authenticated via "remember-me"
1992
+ * ``is_authenticated ``: Returns `` true `` if the user is authenticated via "remember-me"
1993
1993
or authenticated "fully" - i.e. returns true if the user is "logged in";
1994
1994
* ``is_anonymous ``: Equal to using ``IS_AUTHENTICATED_ANONYMOUSLY `` with
1995
1995
the ``isGranted `` function;
0 commit comments