From aafb4f8d5fa56d7724888a1387f89f9111d451e6 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 25 Aug 2022 15:23:04 +0200 Subject: [PATCH] make groupfolders use system wide encryption keys Signed-off-by: Robin Appelman --- lib/private/Encryption/Util.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php index bf89ef26f08..468f924c494 100644 --- a/lib/private/Encryption/Util.php +++ b/lib/private/Encryption/Util.php @@ -34,6 +34,7 @@ use OC\Files\Filesystem; use OC\Files\View; use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\Service\GlobalStoragesService; +use OCA\GroupFolders\Mount\GroupMountPoint; use OCP\Encryption\IEncryptionModule; use OCP\IConfig; use OCP\IUser; @@ -299,6 +300,15 @@ class Util { * @return boolean */ public function isSystemWideMountPoint($path, $uid) { + $mount = Filesystem::getMountManager()->find('/' . $uid . $path); + + /** + * @psalm-suppress UndefinedClass + */ + if ($mount instanceof GroupMountPoint) { + return true; + } + if (\OCP\App::isEnabled("files_external")) { /** @var GlobalStoragesService $storageService */ $storageService = \OC::$server->get(GlobalStoragesService::class); -- 2.39.5