File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/Resources/skeleton/security Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ class <?= $class_name ?> extends Voter
11
11
public const EDIT = 'POST_EDIT';
12
12
public const VIEW = 'POST_VIEW';
13
13
14
- protected function supports(string $attribute, $subject): bool
14
+ protected function supports(string $attribute, mixed $subject): bool
15
15
{
16
16
// replace with your own logic
17
17
// https://symfony.com/doc/current/security/voters.html
18
18
return in_array($attribute, [self::EDIT, self::VIEW])
19
19
&& $subject instanceof \App\Entity\<?= str_replace ('Voter ' , null , $ class_name ) ?> ;
20
20
}
21
21
22
- protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token): bool
22
+ protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
23
23
{
24
24
$user = $token->getUser();
25
25
// if the user is anonymous, do not grant access
You can’t perform that action at this time.
0 commit comments