diff --git a/lib/Controller/DirectViewController.php b/lib/Controller/DirectViewController.php index ab8b10a828..d30b702e6f 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())) {