summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-10-31 12:02:09 +0100
committerJoas Schilling <coding@schilljs.com>2019-11-12 17:37:47 +0100
commitd3b62893afc282c4e49c1bcd349b624370e61c3f (patch)
treeaaf1bce5bc440d654cd9e0847d28eb9596d3852e /apps
parent6d9afca14f3b94d6c62307a2b248c7d9c56e9736 (diff)
downloadnextcloud-server-d3b62893afc282c4e49c1bcd349b624370e61c3f.tar.gz
nextcloud-server-d3b62893afc282c4e49c1bcd349b624370e61c3f.zip
Make sure the super share also has a valid type
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/MountProvider.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php
index 81a7e961860..6dd1dc2f31f 100644
--- a/apps/files_sharing/lib/MountProvider.php
+++ b/apps/files_sharing/lib/MountProvider.php
@@ -96,9 +96,10 @@ class MountProvider implements IMountProvider {
/** @var \OCP\Share\IShare $parentShare */
$parentShare = $share[0];
- if (($parentShare->getShareType() === IShare::TYPE_GROUP ||
- $parentShare->getShareType() === IShare::TYPE_USERGROUP ||
- $parentShare->getShareType() === IShare::TYPE_USER) && $parentShare->getStatus() !== IShare::STATUS_ACCEPTED) {
+ if ($parentShare->getStatus() !== IShare::STATUS_ACCEPTED &&
+ ($parentShare->getShareType() === IShare::TYPE_GROUP ||
+ $parentShare->getShareType() === IShare::TYPE_USERGROUP ||
+ $parentShare->getShareType() === IShare::TYPE_USER)) {
continue;
}
@@ -192,6 +193,7 @@ class MountProvider implements IMountProvider {
$superShare->setId($shares[0]->getId())
->setShareOwner($shares[0]->getShareOwner())
->setNodeId($shares[0]->getNodeId())
+ ->setShareType($shares[0]->getShareType())
->setTarget($shares[0]->getTarget());
// use most permissive permissions