From 1eca58dade7ecc88fd59230f6d9db4c0cd1de3ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 30 Nov 2023 20:34:33 +0100 Subject: [PATCH] fix: Fix version access with new version backend on shared files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Controller/WopiController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php index a9cf99ac26..592ae6e290 100644 --- a/lib/Controller/WopiController.php +++ b/lib/Controller/WopiController.php @@ -386,9 +386,8 @@ public function getFile($fileId, $file = $this->getFileForWopiToken($wopi); \OC_User::setIncognitoMode(true); if ($version !== '0') { - $userFolder = $this->rootFolder->getUserFolder($wopi->getOwnerUid()); $versionManager = \OC::$server->get(IVersionManager::class); - $info = $versionManager->getVersionFile($userFolder->getOwner(), $file, $version); + $info = $versionManager->getVersionFile($this->userManager->get($wopi->getUserForFileAccess()), $file, $version); if ($info->getSize() === 0) { $response = new Http\Response(); } else {