Merge pull request #9123 from owncloud/webdav-move-permissions
Fix permissions check when moving a file to a different directory over webdav
This commit is contained in:
commit
16396e2e33
|
@ -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) {
|
||||
|
|
|
@ -25,6 +25,10 @@ class TestDoubleFileView extends \OC\Files\View{
|
|||
return $this->updatables[$path];
|
||||
}
|
||||
|
||||
public function isCreatable($path) {
|
||||
return $this->updatables[$path];
|
||||
}
|
||||
|
||||
public function isDeletable($path) {
|
||||
return $this->deletables[$path];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue