make groupfolders use system wide encryption keys

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2022-08-25 15:23:04 +02:00
parent f1301097b0
commit aafb4f8d5f
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -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);