Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-09-27 10:51:42 +0300
committerGitHub <noreply@github.com>2022-09-27 10:51:42 +0300
commit187aeb6c3665fee1eda9c5cadeaf068ed43d07b0 (patch)
tree22f95afc07369ff2b36ccff982420545b6c54f37
parent8205f9770e7897912c296699db27edee12d31229 (diff)
parent5580ead5352fd1e519e972ac5555e5449c4b88b7 (diff)
Merge pull request #34102 from nextcloud/backport/33700/stable23
[stable23] make groupfolders use system wide encryption keys
-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);