diff --git a/core/Controller/CollaborationResourcesController.php b/core/Controller/CollaborationResourcesController.php index 77f47a9f0a11ba3de4257ec83a8e59e9a9d6f4a9..4278334c2b9917ce15218f03a15540e7903172ae 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(),