From 4cb127a868e8b6e8edc3a39c1a5b78eb94c68916 Mon Sep 17 00:00:00 2001 From: Jonas Date: Wed, 3 Apr 2024 12:34:42 +0200 Subject: [PATCH] fix(WopiController): In `putFile()` set editor user as user scope 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 --- lib/Controller/WopiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php index 7500cf9fd3..27d85dbcad 100644 --- a/lib/Controller/WopiController.php +++ b/lib/Controller/WopiController.php @@ -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