mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 10:05:03 +00:00
Change usage of match function in AsyncUploadVoter
This commit is contained in:
@@ -43,7 +43,7 @@ final class AsyncUploadVoter extends Voter
|
|||||||
return match ($subject->method) {
|
return match ($subject->method) {
|
||||||
'GET' => $this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject),
|
'GET' => $this->security->isGranted(StoredObjectRoleEnum::SEE->value, $storedObject),
|
||||||
'PUT' => $this->security->isGranted(StoredObjectRoleEnum::EDIT->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')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user