on('propFind', $this->propFind(...)); } public function propFind(PropFind $propFind, INode $node): void { if (!$node instanceof Node) { return; } $fileInfo = $node->getFileInfo(); $mount = $fileInfo->getMountPoint(); if (!$mount instanceof GroupMountPoint) { return; } $propFind->handle(self::ORGANIZATION_FOLDER_ID_PROPERTYNAME, function () use ($fileInfo): int { return $this->folderManager->getFolderByPath($fileInfo->getPath()); }); $propFind->handle(self::ORGANIZATION_FOLDER_RESOURCE_ID_PROPERTYNAME, function () use ($node): ?int { try { return $this->resourceService->findByFileId($node->getId())->getId(); } catch (\Exception $e) { return null; } }); $propFind->handle(self::ORGANIZATION_FOLDER_RESOURCE_MANAGER_PERMISSIONS_PROPERTYNAME, function () use ($node) { try { $resource = $this->resourceService->findByFileId($node->getId()); return $this->authorizationService->isGranted(["READ"], $resource) ? 'true' : 'false'; } catch (\Exception $e) { return null; } }); } }