diff options
author | Julius Härtl <jus@bitgrid.net> | 2024-03-19 09:33:16 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2024-04-09 09:04:24 +0100 |
commit | 4910e7e2310502cde223204f4c7488b4b08655fe (patch) | |
tree | d45b78aa5717cd46b7b19f3bc8bcf795404760c0 /lib/public/Files | |
parent | c53e365ec9a82eb400997a8d585d05522c0e42a1 (diff) | |
download | nextcloud-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/public/Files')
-rw-r--r-- | lib/public/Files/Storage/IStorage.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/public/Files/Storage/IStorage.php b/lib/public/Files/Storage/IStorage.php index 00e98fdfbb6..06cd3b70bbb 100644 --- a/lib/public/Files/Storage/IStorage.php +++ b/lib/public/Files/Storage/IStorage.php @@ -460,4 +460,16 @@ interface IStorage { * @since 9.0.0 */ public function getWatcher(); + + /** + * Allow setting the storage owner + * + * This can be used for storages that do not have a dedicated owner, where we want to + * pass the user that we setup the mountpoint for along to the storage layer + * + * @param string|null $user Owner user id + * @return void + * @since 29.0.0 + */ + public function setOwner(?string $user): void; } |