aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Encryption/File.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2021-06-16 17:12:14 +0200
committerGitHub <noreply@github.com>2021-06-16 17:12:14 +0200
commit4c93249514783181115be8bb040de701bffdba10 (patch)
tree50045595d92b2f71383e0061e6a41c8ff7fba75d /lib/private/Encryption/File.php
parentcebfe4ba0e834dca11632b1e70c0398030e1ead0 (diff)
parent47a8d0d5e0c587bed693f5988d764ac6d50d43c4 (diff)
downloadnextcloud-server-4c93249514783181115be8bb040de701bffdba10.tar.gz
nextcloud-server-4c93249514783181115be8bb040de701bffdba10.zip
Merge pull request #26319 from nextcloud/files_external_app.php
Move files_external to IBootstrap and remove some deprecated stuff in the process
Diffstat (limited to 'lib/private/Encryption/File.php')
-rw-r--r--lib/private/Encryption/File.php11
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);
}
}