Fix permissions check when moving a file to a different directory over webdav

This commit is contained in:
Robin Appelman 2014-06-20 14:29:13 +02:00
parent ca96b9d3d5
commit 80e6d357a2
1 changed files with 1 additions and 4 deletions

View File

@ -135,10 +135,7 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
throw new \Sabre\DAV\Exception\Forbidden();
}
if ($sourceDir !== $destinationDir) {
if (!$this->fileView->isUpdatable($sourceDir)) {
throw new \Sabre\DAV\Exception\Forbidden();
}
if (!$this->fileView->isUpdatable($destinationDir)) {
if (!$this->fileView->isCreatable($destinationDir)) {
throw new \Sabre\DAV\Exception\Forbidden();
}
if (!$this->fileView->isDeletable($sourcePath) && !$isMovableMount) {