From 33a3a7982ef76210e41f70ed927cc54823be8eaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 13 Nov 2023 23:35:41 +0100 Subject: [PATCH] fix: Set proper user scope for direct editing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Controller/DirectViewController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Controller/DirectViewController.php b/lib/Controller/DirectViewController.php index 89725c5764..5ca21b648a 100644 --- a/lib/Controller/DirectViewController.php +++ b/lib/Controller/DirectViewController.php @@ -27,6 +27,7 @@ use OCA\Richdocuments\Db\DirectMapper; use OCA\Richdocuments\Service\FederationService; use OCA\Richdocuments\Service\InitialStateService; +use OCA\Richdocuments\Service\UserScopeService; use OCA\Richdocuments\TemplateManager; use OCA\Richdocuments\TokenManager; use OCP\AppFramework\Controller; @@ -52,6 +53,7 @@ public function __construct( private IRootFolder $rootFolder, private TokenManager $tokenManager, private DirectMapper $directMapper, + private UserScopeService $userScopeService, private InitialStateService $initialState, private IConfig $config, private AppConfig $appConfig, @@ -88,6 +90,8 @@ public function show($token) { return $this->showPublicShare($direct); } + $this->userScopeService->setUserScope($direct->getUid()); + $this->userScopeService->setFilesystemScope($direct->getUid()); $folder = $this->rootFolder->getUserFolder($direct->getUid()); if ($this->templateManager->isTemplate($direct->getFileid())) {