Skip to content

Commit

Permalink
Do not set full path if not currentAccess
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Apr 13, 2017
1 parent f57ef55 commit b96297e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1242,12 +1242,17 @@ public function getAccessList(\OCP\Files\Node $path, $recursive = true, $current
/** @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()) {
Expand Down

0 comments on commit b96297e

Please sign in to comment.