diff options
author | Julius Härtl <jus@bitgrid.net> | 2024-03-19 09:33:16 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-07-22 12:51:50 +0000 |
commit | c60725c8133d4415c23dc20cd91aee07a6f31f79 (patch) | |
tree | 1febd69c2157174b0cbefb30c4317d40d8d2ba0e /apps/files_external/lib | |
parent | 6b76a4eb9486c791f98bce56dffa70dcb0635434 (diff) | |
download | nextcloud-server-c60725c8133d4415c23dc20cd91aee07a6f31f79.tar.gz nextcloud-server-c60725c8133d4415c23dc20cd91aee07a6f31f79.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 'apps/files_external/lib')
-rw-r--r-- | apps/files_external/lib/Config/ConfigAdapter.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/files_external/lib/Config/ConfigAdapter.php b/apps/files_external/lib/Config/ConfigAdapter.php index a60ee84820b..12b6a24bcbe 100644 --- a/apps/files_external/lib/Config/ConfigAdapter.php +++ b/apps/files_external/lib/Config/ConfigAdapter.php @@ -140,6 +140,7 @@ class ConfigAdapter implements IMountProvider { }, $storages, $storageConfigs); $mounts = array_map(function (StorageConfig $storageConfig, Storage\IStorage $storage) use ($user, $loader) { + $storage->setOwner($user->getUID()); if ($storageConfig->getType() === StorageConfig::MOUNT_TYPE_PERSONAL) { return new PersonalMount( $this->userStoragesService, |