mirror of
https://github.com/symfony/symfony-docs.git
synced 2026-03-24 00:32:14 +01:00
Minor tweak
This commit is contained in:
@@ -215,10 +215,7 @@ returns an array of values that will be injected into the closure::
|
||||
|
||||
class MyController extends AbstractController
|
||||
{
|
||||
#[IsGranted(static function (
|
||||
IsGrantedContext $context,
|
||||
mixed $subject,
|
||||
) {
|
||||
#[IsGranted(static function (IsGrantedContext $context, mixed $subject) {
|
||||
return $context->user === $subject['post']->getAuthor();
|
||||
}, subject: static function (array $args) {
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user