From 25e89571f7be08802c6e1aa4604dc5ce848b65ae Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 4 Jul 2024 15:48:08 +0200 Subject: [PATCH] Change usage of match function in AsyncUploadVoter --- .../Security/Authorization/AsyncUploadVoter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillDocStoreBundle/Security/Authorization/AsyncUploadVoter.php b/src/Bundle/ChillDocStoreBundle/Security/Authorization/AsyncUploadVoter.php index ccda803e4..25981db1e 100644 --- a/src/Bundle/ChillDocStoreBundle/Security/Authorization/AsyncUploadVoter.php +++ b/src/Bundle/ChillDocStoreBundle/Security/Authorization/AsyncUploadVoter.php @@ -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') }; } }