Skip to content

Commit

Permalink
Merge pull request #3558 from nextcloud/fix/guest_user_scope
Browse files Browse the repository at this point in the history
fix(WopiController): In `putFile()` set editor user as user scope
  • Loading branch information
mejo- committed Apr 3, 2024
2 parents b617910 + 4cb127a commit b6dff30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public function putFile($fileId,

if (!$this->encryptionManager->isEnabled() || $this->isMasterKeyEnabled()) {
// Set the user to register the change under his name
$this->userScopeService->setUserScope($wopi->getUserForFileAccess());
$this->userScopeService->setUserScope($wopi->getEditorUid());
$this->userScopeService->setFilesystemScope($isPutRelative ? $wopi->getEditorUid() : $wopi->getUserForFileAccess());
} else {
// Per-user encryption is enabled so that collabora isn't able to store the file by using the
Expand Down

0 comments on commit b6dff30

Please sign in to comment.