Skip to content

Commit d28f880

Browse files
committed
minor #16618 [Security] Add note about AccessDeniedException being thrown (Seldaek)
This PR was merged into the 6.1 branch. Discussion ---------- [Security] Add note about AccessDeniedException being thrown Fixes #16614 <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- d6af72b Add note about AccessDeniedException being thrown
2 parents 942dce5 + d6af72b commit d28f880

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controller/argument_value_resolver.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ In addition, some components and official bundles provide other value resolvers:
8888
with ``UserInterface``. Default value can be set to ``null`` in case
8989
the controller can be accessed by anonymous users. It requires installing
9090
the :doc:`SecurityBundle </security>`.
91+
92+
If the argument is not nullable and there is no logged in user or the logged in
93+
user has a user class not matching the type-hinted class, an ``AccessDeniedException``
94+
is thrown by the resolver to prevent access to the controller.
9195

9296
Adding a Custom Value Resolver
9397
------------------------------

0 commit comments

Comments
 (0)