mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-04-09 14:33:44 +00:00
Fix TicketVoter assert to accept Person subject
The voter supports Person::class for READ via voterHelper, but the assert in voteOnAttribute() only accepted Ticket|null. This caused assertion failures when rendering person pages that check ticket permissions via menu rendering. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -50,7 +50,7 @@ final class TicketVoter extends Voter implements ProvideRoleHierarchyInterface
|
||||
|
||||
protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token): bool
|
||||
{
|
||||
assert($subject instanceof Ticket || null === $subject);
|
||||
assert($subject instanceof Ticket || $subject instanceof Person || null === $subject);
|
||||
|
||||
$user = $token->getUser();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user