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

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMax <max@nextcloud.com>2022-06-22 15:19:13 +0300
committerMax <max@nextcloud.com>2022-07-06 11:51:52 +0300
commit741d952e13db24cac1ccb59d881fe3a9ef5de02a (patch)
tree5a77134ec258e9f29b2ce4174c5c7002de497181 /lib
parent63bbd4ad8b1081c91b7417d3cd7b9e654bf762ca (diff)
fix: bring back the share owner handling and workspace file id
These fixes were lost when reverting 3e40b7b. Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/DAV/WorkspacePlugin.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/DAV/WorkspacePlugin.php b/lib/DAV/WorkspacePlugin.php
index db5d136cd..c45d1159e 100644
--- a/lib/DAV/WorkspacePlugin.php
+++ b/lib/DAV/WorkspacePlugin.php
@@ -98,8 +98,9 @@ class WorkspacePlugin extends ServerPlugin {
// Only return the property for the parent node and ignore it for further in depth nodes
if ($propFind->getDepth() === $this->server->getHTTPDepth(1)) {
$propFind->handle(self::WORKSPACE_PROPERTY, function () use ($node) {
+ $owner = $this->userId ?? $node->getFileInfo()->getStorage()->getOwner('');
/** @var Folder[] $nodes */
- $nodes = $this->rootFolder->getUserFolder($this->userId)->getById($node->getId());
+ $nodes = $this->rootFolder->getUserFolder($owner)->getById($node->getId());
if (count($nodes) > 0) {
/** @var File $file */
try {
@@ -121,7 +122,7 @@ class WorkspacePlugin extends ServerPlugin {
try {
$file = $this->workspaceService->getFile($nodes[0]);
if ($file instanceof File) {
- return $file->getFileInfo()->getName();
+ return $file->getFileInfo()->getId();
}
} catch (StorageNotAvailableException $e) {
// If a storage is not available we can for the propfind response assume that there is no rich workspace present