Commit 9d4972d 1 parent 2fda262 commit 9d4972d Copy full SHA for 9d4972d
File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2596,12 +2596,13 @@ want to include extra details only for users that have a ``ROLE_SALES_ADMIN`` ro
2596
2596
// ...
2597
2597
}
2598
2598
2599
+
2599
2600
.. tip ::
2600
2601
2601
- Using ``isGranted() `` checks authorization against the currently logged in user. If you need to check
2602
- against a user that is not the one logged in or if checking authorization when the user session is not
2603
- available in a CLI context (example: message queue, cronjob) `` isGrantedForUser() `` can be used to set the
2604
- target user explicitly.
2602
+ The ``isGranted() `` method checks authorization for the currently logged- in user.
2603
+ If you need to check authorization for a different user or when the user session
2604
+ is unavailable (e.g., in a CLI context such as a message queue or cron job), you
2605
+ can use the `` isGrantedForUser() `` method to explicitly set the target user .
2605
2606
2606
2607
.. versionadded :: 7.3
2607
2608
You can’t perform that action at this time.
0 commit comments