summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-04-20 11:03:22 +0200
committerGitHub <noreply@github.com>2017-04-20 11:03:22 +0200
commit140580f9d8468b8450f31dca997916a07693277f (patch)
tree045ba4c64f3225f45128e6b397687f0375be2b00 /lib
parentb469882595e9dca6d8d32d01c1784162cda6a2d8 (diff)
parentae2db5e60da8037568fae86506ca65182924e90b (diff)
downloadnextcloud-server-140580f9d8468b8450f31dca997916a07693277f.tar.gz
nextcloud-server-140580f9d8468b8450f31dca997916a07693277f.zip
Merge pull request #4398 from nextcloud/fix_accesslistcode
Get proper accesslist for userFolder
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 6e59629153e..3afd38c579f 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1233,7 +1233,7 @@ class Manager implements IManager {
//Get node for the owner
$userFolder = $this->rootFolder->getUserFolder($owner);
- if (!$userFolder->isSubNode($path)) {
+ if ($path->getId() !== $userFolder->getId() && !$userFolder->isSubNode($path)) {
$path = $userFolder->getById($path->getId())[0];
}
@@ -1245,7 +1245,12 @@ class Manager implements IManager {
if ($currentAccess) {
$ownerPath = $path->getPath();
- list(, , , $ownerPath) = explode('/', $ownerPath, 4);
+ $ownerPath = explode('/', $ownerPath, 4);
+ if (count($ownerPath) < 4) {
+ $ownerPath = '';
+ } else {
+ $ownerPath = $ownerPath[3];
+ }
$al['users'][$owner] = [
'node_id' => $path->getId(),
'node_path' => '/' . $ownerPath,