Skip to content

Commit

Permalink
fix(WopiController): In putFile() set editor user as user scope
Browse files Browse the repository at this point in the history
This fixes saves in shares being attributed to the share owner. With
this change, they're attributed to 'remote user' in the activity stream.

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Apr 3, 2024
1 parent b617910 commit 4cb127a
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 4cb127a

Please sign in to comment.