fix: Ensure edit permissions are checked before template file token generation

otherwise file created from template will be editable for user with readonly permissions

Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
This commit is contained in:
Misha M.-Kupriyanov 2025-04-25 09:38:14 +02:00 committed by Mikhailo Matiyenko-Kupriyanov
parent 9a89115d87
commit 9222570ccc

View file

@ -185,6 +185,8 @@ class TokenManager {
$updatable = $updatable && $shareUpdatable;
}
$updatable = $updatable && $this->permissionManager->userCanEdit($editoruid);
$serverHost = $this->urlGenerator->getAbsoluteURL('/');
return $this->wopiMapper->generateFileToken(