@@ -74,13 +74,15 @@ Authorization (i.e. Denying Access)
7474-----------------------------------
7575
7676Symfony gives you several ways to enforce authorization, including the ``access_control ``
77- configuration in :doc: `security.yml </reference/configuration/security >` and
78- using :ref: `isGranted <best-practices-directly-isGranted >` on the ``security.context ``
77+ configuration in :doc: `security.yml </reference/configuration/security >`, the
78+ :ref: `@Security annotation <best-practices-security-annotation >` and using
79+ :ref: `isGranted <best-practices-directly-isGranted >` on the ``security.context ``
7980service directly.
8081
8182.. best-practice ::
8283
8384 * For protecting broad URL patterns, use ``access_control ``;
85+ * Whenever possible, use the ``@Security `` annotation;
8486 * Check security directly on the ``security.context `` service whenever
8587 you have a more complex situation.
8688
@@ -207,9 +209,10 @@ Now you can reuse this method both in the template and in the security expressio
207209
208210.. _best-practices-directly-isGranted :
209211.. _checking-permissions-without-security :
212+ .. _manually-checking-permissions :
210213
211- Manually Checking Permissions
212- -----------------------------
214+ Checking Permissions without @Security
215+ --------------------------------------
213216
214217The above example with ``@Security `` only works because we're using the
215218:ref: `ParamConverter <best-practices-paramconverter >`, which gives the expression
0 commit comments