summaryrefslogtreecommitdiffstats
path: root/lib/private/Encryption
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-08-25 15:23:04 +0200
committerRobin Appelman <robin@icewind.nl>2022-09-15 15:30:50 +0200
commitaafb4f8d5fa56d7724888a1387f89f9111d451e6 (patch)
tree02dfc2a486141a15feaa0bd85fff4d288f4e2251 /lib/private/Encryption
parentf1301097b0fec6f118b4216f50a59134d35cf043 (diff)
downloadnextcloud-server-aafb4f8d5fa56d7724888a1387f89f9111d451e6.tar.gz
nextcloud-server-aafb4f8d5fa56d7724888a1387f89f9111d451e6.zip
make groupfolders use system wide encryption keys
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Encryption')
-rw-r--r--lib/private/Encryption/Util.php10
1 files changed, 10 insertions, 0 deletions
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);