summaryrefslogtreecommitdiffstats
path: root/core/Controller/CollaborationResourcesController.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Controller/CollaborationResourcesController.php')
-rw-r--r--core/Controller/CollaborationResourcesController.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Controller/CollaborationResourcesController.php b/core/Controller/CollaborationResourcesController.php
index 77f47a9f0a1..4278334c2b9 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(),