aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre/Node.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-08-27 16:02:45 +0200
committerRobin Appelman <robin@icewind.nl>2021-08-27 16:02:45 +0200
commita334eb7ab12a07319e16e8697ef967cd7c57b42d (patch)
tree1e203bb69723af81c801d73c8a66d9a2ef5ec850 /apps/dav/lib/Connector/Sabre/Node.php
parentfd93aa816231954ca628daa85bd091fd6ff3a570 (diff)
downloadnextcloud-server-a334eb7ab12a07319e16e8697ef967cd7c57b42d.tar.gz
nextcloud-server-a334eb7ab12a07319e16e8697ef967cd7c57b42d.zip
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 <robin@icewind.nl>
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/Node.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/Node.php2
1 files changed, 1 insertions, 1 deletions
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();
}