From a334eb7ab12a07319e16e8697ef967cd7c57b42d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 27 Aug 2021 16:02:45 +0200 Subject: [PATCH] always allow dav move for movable mount root the root of a movable mountpoint can be moved even if it doesn't have update permissions Signed-off-by: Robin Appelman --- apps/dav/lib/Connector/Sabre/Node.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php index aa03f42dc35..7f7299296c6 100644 --- a/apps/dav/lib/Connector/Sabre/Node.php +++ b/apps/dav/lib/Connector/Sabre/Node.php @@ -125,7 +125,7 @@ abstract class Node implements \Sabre\DAV\INode { public function setName($name) { // rename is only allowed if the update privilege is granted - if (!$this->info->isUpdateable()) { + if (!($this->info->isUpdateable() || ($this->info->getMountPoint() instanceof MoveableMount && $this->info->getInternalPath() === ''))) { throw new \Sabre\DAV\Exception\Forbidden(); } -- 2.39.5