|
|
@@ -6,6 +6,7 @@ use App\Entity\Article;
|
|
|
use App\Entity\User;
|
|
|
use Symfony\Bundle\SecurityBundle\Security;
|
|
|
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
|
|
+use Symfony\Component\Security\Core\Authorization\Voter\Vote;
|
|
|
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
|
|
|
|
|
|
final class ArticleVoter extends Voter
|
|
|
@@ -30,7 +31,7 @@ final class ArticleVoter extends Voter
|
|
|
&& $subject instanceof \App\Entity\Article;
|
|
|
}
|
|
|
|
|
|
- protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
|
|
|
+ protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Vote $vote = null): bool
|
|
|
{
|
|
|
$user = $token->getUser();
|
|
|
|