]> source.dussan.org Git - nextcloud-server.git/commitdiff
make groupfolders use system wide encryption keys 34102/head
authorRobin Appelman <robin@icewind.nl>
Thu, 25 Aug 2022 13:23:04 +0000 (15:23 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Thu, 15 Sep 2022 21:02:16 +0000 (21:02 +0000)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Encryption/Util.php

index bf89ef26f082ccb9c4bdc9214485e8aa9d1c293c..468f924c494c8e15981a77e25f03d16428db4a8e 100644 (file)
@@ -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);