Skip to content

Commit

Permalink
Merge pull request #3879 from nextcloud/backport/3635/stable28
Browse files Browse the repository at this point in the history
[stable28] fix: Block incompatible operations with remote tokens
  • Loading branch information
juliusknorr authored Aug 6, 2024
2 parents ca101be + 8b4676e commit 1a0f7db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ public function checkFileInfo($fileId, $access_token) {
'UserExtraInfo' => [],
'UserPrivateInfo' => [],
'UserCanWrite' => $canWriteThroughLock && (bool)$wopi->getCanwrite(),
'UserCanNotWriteRelative' => $isPublic || $this->encryptionManager->isEnabled() || $wopi->getHideDownload(),
'UserCanNotWriteRelative' => $isPublic || $this->encryptionManager->isEnabled() || $wopi->getHideDownload() || $wopi->isRemoteToken(),
'PostMessageOrigin' => $wopi->getServerHost(),
'LastModifiedTime' => Helper::toISO8601($file->getMTime()),
'SupportsRename' => !$isVersion,
'UserCanRename' => !$isPublic && !$isVersion,
'SupportsRename' => !$isVersion && !$wopi->isRemoteToken(),
'UserCanRename' => !$isPublic && !$isVersion && !$wopi->isRemoteToken(),
'EnableInsertRemoteImage' => !$isPublic,
'EnableShare' => $file->isShareable() && !$isVersion && !$isPublic,
'HideUserList' => '',
Expand Down

0 comments on commit 1a0f7db

Please sign in to comment.