Skip to content

Commit

Permalink
make groupfolders use system wide encryption keys
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Aug 29, 2022
1 parent f130109 commit 5df06f3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/private/Encryption/Util.php
Expand Up @@ -34,6 +34,7 @@
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;
Expand Down Expand Up @@ -299,6 +300,13 @@ public function getUserWithAccessToMountPoint($users, $groups) {
* @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);
Expand Down

0 comments on commit 5df06f3

Please sign in to comment.