aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage/Wrapper
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2024-03-19 09:33:16 +0100
committerJulius Härtl <jus@bitgrid.net>2024-04-09 09:04:24 +0100
commit4910e7e2310502cde223204f4c7488b4b08655fe (patch)
treed45b78aa5717cd46b7b19f3bc8bcf795404760c0 /lib/private/Files/Storage/Wrapper
parentc53e365ec9a82eb400997a8d585d05522c0e42a1 (diff)
downloadnextcloud-server-4910e7e2310502cde223204f4c7488b4b08655fe.tar.gz
nextcloud-server-4910e7e2310502cde223204f4c7488b4b08655fe.zip
fix: Pass the mountpoint target user to storages without owner
Storages that do not have a dedicated owner (e.g. groupfolders, external storages) currently always assume the current session user as the owner. This leads to several issues when there is no user session but a node is obtained through a user folder. In order to have the correct user available we need to pass the user that is used to setup a mountpoint along to the storage layer as we generally assume that an owner is available for those. Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Files/Storage/Wrapper')
-rw-r--r--lib/private/Files/Storage/Wrapper/Wrapper.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php
index 2e96733ec66..9b7ca0214d1 100644
--- a/lib/private/Files/Storage/Wrapper/Wrapper.php
+++ b/lib/private/Files/Storage/Wrapper/Wrapper.php
@@ -674,4 +674,8 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea
}
return false;
}
+
+ public function setOwner(?string $user): void {
+ $this->getWrapperStorage()->setOwner($user);
+ }
}