Skip to content

Commit 46e2fa8

Browse files
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>
1 parent 1c919bf commit 46e2fa8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/TokenManager.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ public function generateWopiTokenForTemplate(
193193
$updatable = $updatable && $shareUpdatable;
194194
}
195195

196+
$updatable = $updatable && $this->permissionManager->userCanEdit($editoruid);
197+
196198
$serverHost = $this->urlGenerator->getAbsoluteURL('/');
197199

198200
return $this->wopiMapper->generateFileToken(

0 commit comments

Comments
 (0)