Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-02-14 12:59:17 +0300
committerJoas Schilling <coding@schilljs.com>2019-02-18 12:57:12 +0300
commitf66c37bdb8fe3ed84737554e1e9bbb8d33722496 (patch)
tree33789855142697a30a07ef67c6e6ca84386ed131 /lib
parent0b7b938a60ad9a04712278bc5b8e543f07204200 (diff)
Correctly determinate the owner in case of shared external storages
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index b04f1acbd87..884ab4754f5 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1419,10 +1419,12 @@ class Manager implements IManager {
return $al;
}
- //Get node for the owner
+ //Get node for the owner and correct the owner in case of external storages
$userFolder = $this->rootFolder->getUserFolder($owner);
if ($path->getId() !== $userFolder->getId() && !$userFolder->isSubNode($path)) {
- $path = $userFolder->getById($path->getId())[0];
+ $nodes = $userFolder->getById($path->getId());
+ $path = array_shift($nodes);
+ $owner = $path->getOwner()->getUID();
}
$providers = $this->factory->getAllProviders();