summaryrefslogtreecommitdiffstats
path: root/lib/private/connector
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-04-17 15:54:45 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-04-23 12:54:26 +0200
commit7ef8f6d352811e635bc6cf99b56d9482a54eb791 (patch)
tree64f51aa93d4dae96accb2f0a979571b09305edfa /lib/private/connector
parentb102222fed33245c6da8a39c28f0d0a570d0dbea (diff)
downloadnextcloud-server-7ef8f6d352811e635bc6cf99b56d9482a54eb791.tar.gz
nextcloud-server-7ef8f6d352811e635bc6cf99b56d9482a54eb791.zip
always allow to rename the share mount point
Diffstat (limited to 'lib/private/connector')
-rw-r--r--lib/private/connector/sabre/objecttree.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php
index d2fa425b22c..2956f608380 100644
--- a/lib/private/connector/sabre/objecttree.php
+++ b/lib/private/connector/sabre/objecttree.php
@@ -87,9 +87,15 @@ class ObjectTree extends \Sabre_DAV_ObjectTree {
list($sourceDir,) = \Sabre_DAV_URLUtil::splitPath($sourcePath);
list($destinationDir,) = \Sabre_DAV_URLUtil::splitPath($destinationPath);
+ $isShareMountPoint = false;
+ list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath( '/' . \OCP\User::getUser() . '/files/' . $sourcePath);
+ if ($storage instanceof \OC\Files\Storage\Shared && !$internalPath) {
+ $isShareMountPoint = true;
+ }
+
// check update privileges
$fs = $this->getFileView();
- if (!$fs->isUpdatable($sourcePath)) {
+ if (!$fs->isUpdatable($sourcePath) && !$isShareMountPoint) {
throw new \Sabre_DAV_Exception_Forbidden();
}
if ($sourceDir !== $destinationDir) {