Skip to content

Commit 9222570

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 9a89115 commit 9222570

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
@@ -185,6 +185,8 @@ public function generateWopiTokenForTemplate(
185185
$updatable = $updatable && $shareUpdatable;
186186
}
187187

188+
$updatable = $updatable && $this->permissionManager->userCanEdit($editoruid);
189+
188190
$serverHost = $this->urlGenerator->getAbsoluteURL('/');
189191

190192
return $this->wopiMapper->generateFileToken(

0 commit comments

Comments
 (0)