From b96297e9cc10e5cb7f71a9268eefb534353ca059 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 13 Apr 2017 12:58:29 +0200 Subject: Do not set full path if not currentAccess Signed-off-by: Roeland Jago Douma --- lib/private/Share20/Manager.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 8b670da544b..6e59629153e 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1242,12 +1242,17 @@ class Manager implements IManager { /** @var Node[] $nodes */ $nodes = []; - $ownerPath = $path->getPath(); - list(,,,$ownerPath) = explode('/', $ownerPath, 4); - $al['users'][$owner] = [ - 'node_id' => $path->getId(), - 'node_path' => '/' . $ownerPath, - ]; + + if ($currentAccess) { + $ownerPath = $path->getPath(); + list(, , , $ownerPath) = explode('/', $ownerPath, 4); + $al['users'][$owner] = [ + 'node_id' => $path->getId(), + 'node_path' => '/' . $ownerPath, + ]; + } else { + $al['users'][] = $owner; + } // Collect all the shares while ($path->getPath() !== $userFolder->getPath()) { -- cgit v1.2.3