mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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:
parent
ab6a1e62b2
commit
6b05ce612c
2 changed files with 7 additions and 3 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class DirPermissionsMask extends PermissionsMask {
|
|||
}
|
||||
|
||||
public function rename($source, $target): bool {
|
||||
if (!$this->isUpdatable($source)) {
|
||||
if (!$this->isDeletable($source)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue