From 563ec5cc4596a1c3abe7552ec60b4ec4dd8164f4 Mon Sep 17 00:00:00 2001 From: Nicolas Boulay Date: Fri, 2 Feb 2024 09:27:32 -0500 Subject: [PATCH] pkp/pkp-lib#9453 Fix to get the ReviewAssignment and not the DAO in the policy --- .../internal/SubmissionFileAssignedReviewerAccessPolicy.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/security/authorization/internal/SubmissionFileAssignedReviewerAccessPolicy.php b/classes/security/authorization/internal/SubmissionFileAssignedReviewerAccessPolicy.php index 12d9a2b4327..936a70c43cf 100644 --- a/classes/security/authorization/internal/SubmissionFileAssignedReviewerAccessPolicy.php +++ b/classes/security/authorization/internal/SubmissionFileAssignedReviewerAccessPolicy.php @@ -50,7 +50,9 @@ public function effect() } $context = $request->getContext(); - $reviewAssignments = Repo::reviewAssignment()->getCollector()->filterByReviewerIds([$user->getId()])->getMany(); + $reviewAssignments = Repo::reviewAssignment()->getCollector() + ->filterByReviewerIds([$user->getId()]) + ->getMany(); $reviewFilesDao = DAORegistry::getDAO('ReviewFilesDAO'); /** @var ReviewFilesDAO $reviewFilesDao */ foreach ($reviewAssignments as $reviewAssignment) { if ($context->getData('restrictReviewerFileAccess') && !$reviewAssignment->getDateConfirmed()) {