From eecd9323c5e79f27051bb56a110ee4f26d630b7a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 22 Feb 2019 09:47:36 +0100 Subject: [PATCH] Also check the access to collections on preparing Signed-off-by: Joas Schilling --- core/Controller/CollaborationResourcesController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/Controller/CollaborationResourcesController.php b/core/Controller/CollaborationResourcesController.php index 77f47a9f0a..4278334c2b 100644 --- a/core/Controller/CollaborationResourcesController.php +++ b/core/Controller/CollaborationResourcesController.php @@ -225,6 +225,10 @@ class CollaborationResourcesController extends OCSController { } protected function prepareCollection(ICollection $collection): array { + if (!$collection->canAccess($this->userSession->getUser())) { + return null; + } + return [ 'id' => $collection->getId(), 'name' => $collection->getName(),