Change usage of match function in AsyncUploadVoter

This commit is contained in:
Julie Lenaerts 2024-07-04 15:48:08 +02:00
parent 435836c7d1
commit 25e89571f7

View File

@ -43,7 +43,7 @@ final class AsyncUploadVoter extends Voter
return match ($subject->method) {
'GET' => $this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject),
'PUT' => $this->security->isGranted(StoredObjectRoleEnum::EDIT->value, $storedObject),
default => $this->security->isGranted('ROLE_USER') || $this->security->isGranted('ROLE_ADMIN')
'POST', 'HEAD' => $this->security->isGranted('ROLE_USER') || $this->security->isGranted('ROLE_ADMIN')
};
}
}