From 60da25681eb7f7f4b611c0c899b3485a8c66ef65 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 6 Sep 2019 13:25:08 +0200 Subject: [PATCH] Only restrict loading of group and user shares for now Signed-off-by: Joas Schilling --- apps/files_sharing/lib/MountProvider.php | 4 +++- lib/public/Share/IShare.php | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php index 1f73396996..81a7e96186 100644 --- a/apps/files_sharing/lib/MountProvider.php +++ b/apps/files_sharing/lib/MountProvider.php @@ -96,7 +96,9 @@ class MountProvider implements IMountProvider { /** @var \OCP\Share\IShare $parentShare */ $parentShare = $share[0]; - if ($parentShare->getStatus() !== IShare::STATUS_ACCEPTED) { + if (($parentShare->getShareType() === IShare::TYPE_GROUP || + $parentShare->getShareType() === IShare::TYPE_USERGROUP || + $parentShare->getShareType() === IShare::TYPE_USER) && $parentShare->getStatus() !== IShare::STATUS_ACCEPTED) { continue; } diff --git a/lib/public/Share/IShare.php b/lib/public/Share/IShare.php index a4d120da5f..1064f59e6d 100644 --- a/lib/public/Share/IShare.php +++ b/lib/public/Share/IShare.php @@ -49,6 +49,12 @@ interface IShare { */ public const TYPE_GROUP = 1; + /** + * @internal + * @since 18.0.0 + */ + public const TYPE_USERGROUP = 2; + /** * @since 17.0.0 */