diff options
author | Robin Appelman <robin@icewind.nl> | 2022-08-25 16:23:04 +0300 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-09-16 00:02:16 +0300 |
commit | 5580ead5352fd1e519e972ac5555e5449c4b88b7 (patch) | |
tree | 6f614dcb21a92479dbbb355b3a5c59c19818a96a | |
parent | 2348bed8e89c311939b07e3112e2eed3878ce3c0 (diff) |
make groupfolders use system wide encryption keysbackport/33700/stable23
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | lib/private/Encryption/Util.php | 10 |
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); |