Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
make groupfolders use system wide encryption keys
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and backportbot-nextcloud[bot] committed Sep 15, 2022
commit 5580ead5352fd1e519e972ac5555e5449c4b88b7
10 changes: 10 additions & 0 deletions lib/private/Encryption/Util.php
Original file line number Diff line number Diff line change
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,15 @@ 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