From 57e4a10148611b615e1a642914c48e5a72bb601a Mon Sep 17 00:00:00 2001 From: christianbeeznst Date: Tue, 12 Nov 2024 14:43:05 -0500 Subject: [PATCH] Internal: Fix access to public course documents for authenticated users - refs BT#22191 --- .../Security/Authorization/Voter/ResourceNodeVoter.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CoreBundle/Security/Authorization/Voter/ResourceNodeVoter.php b/src/CoreBundle/Security/Authorization/Voter/ResourceNodeVoter.php index f89b9ae1bd..bc53ed6fae 100644 --- a/src/CoreBundle/Security/Authorization/Voter/ResourceNodeVoter.php +++ b/src/CoreBundle/Security/Authorization/Voter/ResourceNodeVoter.php @@ -173,6 +173,11 @@ class ResourceNodeVoter extends Voter ) { return true; } + if ($firstLink->getCourse() instanceof Course + && $firstLink->getCourse()->isPublic() + ) { + return true; + } } $linkFound = 0;