Skip to content

Commit

Permalink
Merge pull request #1610 from nextcloud/backport/1590/stable21
Browse files Browse the repository at this point in the history
[stable21] Only return workspace property for top node in a propfind request
  • Loading branch information
juliusknorr authored May 20, 2021
2 parents 83c17eb + b4f15e3 commit fb5aeb4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/DAV/WorkspacePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ public function propFind(PropFind $propFind, INode $node) {
if (!$workspaceAvailable || !$workspaceEnabled) {
return;
}
if ($propFind->getDepth() > 0) {

// Only return the property for the parent node and ignore it for further in depth nodes
if ($propFind->getDepth() === $this->server->getHTTPDepth()) {
$propFind->handle(self::WORKSPACE_PROPERTY, function () use ($node) {
/** @var Folder[] $nodes */
$nodes = $this->rootFolder->getUserFolder($this->userId)->getById($node->getId());
Expand Down

0 comments on commit fb5aeb4

Please sign in to comment.