diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-13 12:58:29 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-13 12:58:53 +0200 |
commit | b96297e9cc10e5cb7f71a9268eefb534353ca059 (patch) | |
tree | c19427a89430aa19e48c85371bc0b304ffea3210 /lib | |
parent | f57ef5524902be35fb944aa871279cf7ad9777e1 (diff) | |
download | nextcloud-server-b96297e9cc10e5cb7f71a9268eefb534353ca059.tar.gz nextcloud-server-b96297e9cc10e5cb7f71a9268eefb534353ca059.zip |
Do not set full path if not currentAccess
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Share20/Manager.php | 17 |
1 files 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()) { |