diff options
author | Joas Schilling <coding@schilljs.com> | 2019-02-14 10:59:17 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-02-18 10:57:12 +0100 |
commit | f66c37bdb8fe3ed84737554e1e9bbb8d33722496 (patch) | |
tree | 33789855142697a30a07ef67c6e6ca84386ed131 /lib/private/Share20 | |
parent | 0b7b938a60ad9a04712278bc5b8e543f07204200 (diff) | |
download | nextcloud-server-f66c37bdb8fe3ed84737554e1e9bbb8d33722496.tar.gz nextcloud-server-f66c37bdb8fe3ed84737554e1e9bbb8d33722496.zip |
Correctly determinate the owner in case of shared external storages
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Share20')
-rw-r--r-- | lib/private/Share20/Manager.php | 6 |
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(); |