Make sure we query the node before fetching the name

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-01-23 16:35:35 +01:00
parent 7843b8b1fa
commit 555afff015
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 4 additions and 0 deletions

View File

@ -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(),