diff options
Diffstat (limited to 'lib/private/Encryption/File.php')
-rw-r--r-- | lib/private/Encryption/File.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/private/Encryption/File.php b/lib/private/Encryption/File.php index 76d8900a40e..2c486dfade6 100644 --- a/lib/private/Encryption/File.php +++ b/lib/private/Encryption/File.php @@ -28,6 +28,7 @@ namespace OC\Encryption; use OC\Cache\CappedMemoryCache; +use OCA\Files_External\Service\GlobalStoragesService; use OCP\Files\IRootFolder; use OCP\Files\NotFoundException; use OCP\Share\IManager; @@ -110,10 +111,12 @@ class File implements \OCP\Encryption\IFile { // check if it is a group mount if (\OCP\App::isEnabled("files_external")) { - $mounts = \OCA\Files_External\MountConfig::getSystemMountPoints(); - foreach ($mounts as $mount) { - if ($mount['mountpoint'] == substr($ownerPath, 1, strlen($mount['mountpoint']))) { - $mountedFor = $this->util->getUserWithAccessToMountPoint($mount['applicable']['users'], $mount['applicable']['groups']); + /** @var GlobalStoragesService $storageService */ + $storageService = \OC::$server->get(GlobalStoragesService::class); + $storages = $storageService->getAllStorages(); + foreach ($storages as $storage) { + if ($storage->getMountPoint() == substr($ownerPath, 0, strlen($storage->getMountPoint()))) { + $mountedFor = $this->util->getUserWithAccessToMountPoint($storage->getApplicableUsers(), $storage->getApplicableGroups()); $userIds = array_merge($userIds, $mountedFor); } } |