fix: Fix permission issue when uploading a chunked file

Follow up from #59511

Signed-off-by: Carl Schwan <carlschwan@kde.org>
This commit is contained in:
Carl Schwan 2026-04-15 17:21:46 +02:00 committed by backportbot[bot]
parent ab6a1e62b2
commit 6b05ce612c
2 changed files with 7 additions and 3 deletions

View file

@ -6,7 +6,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
use OC\Files\Filesystem;
use OC\Files\Storage\Wrapper\PermissionsMask;
use OC\Files\Storage\Wrapper\DirPermissionsMask;
use OC\Files\View;
use OCA\DAV\Connector\Sabre\PublicAuth;
use OCA\DAV\Connector\Sabre\ServerFactory;
@ -111,7 +111,11 @@ $server = $serverFactory->createServer(true, $baseuri, $requestUri, $authPlugin,
$mask |= Constants::PERMISSION_READ | Constants::PERMISSION_DELETE;
}
return new PermissionsMask(['storage' => $storage, 'mask' => $mask]);
return new DirPermissionsMask([
'storage' => $storage,
'mask' => $mask,
'path' => 'files',
]);
});
/** @psalm-suppress MissingClosureParamType */

View file

@ -88,7 +88,7 @@ class DirPermissionsMask extends PermissionsMask {
}
public function rename($source, $target): bool {
if (!$this->isUpdatable($source)) {
if (!$this->isDeletable($source)) {
return false;
}