Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-01-23 18:35:35 +0300
committerJulius Härtl <jus@bitgrid.net>2019-03-01 22:56:17 +0300
commit555afff015ec2fa785726bf0d9169d25d53ba679 (patch)
tree4b71076719fcbae93e0aca82d10b032538b54d05 /core/Controller
parent7843b8b1fa4dff3d3d4fac0fb81f144e5df1e34f (diff)
Make sure we query the node before fetching the name
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core/Controller')
-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 ea21f0c584a..a5a40145fb7 100644
--- a/core/Controller/CollaborationResourcesController.php
+++ b/core/Controller/CollaborationResourcesController.php
@@ -198,6 +198,10 @@ class CollaborationResourcesController extends OCSController {
}
protected function prepareResources(IResource $resource): array {
+ if (!$resource->canAccess($this->userSession->getUser())) {
+ return [];
+ }
+
return [
'type' => $resource->getType(),
'id' => $resource->getId(),