summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-04 12:01:32 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-04 12:01:32 +0100
commit048e11d25fa3d44f81598ce0cb202ca11c93248e (patch)
treec01fd56d6ee1edd39f38a025fae0a9bc22fcc600
parent533896bd66727d90fe93bac39551f54da5a997af (diff)
parent3bdafc2122acede0ed4810768718ff9d2c947e64 (diff)
downloadnextcloud-server-048e11d25fa3d44f81598ce0cb202ca11c93248e.tar.gz
nextcloud-server-048e11d25fa3d44f81598ce0cb202ca11c93248e.zip
Merge pull request #22830 from owncloud/fix_dav_permissions
Rename and move permissions are set when a file is updatable
-rw-r--r--apps/dav/lib/connector/sabre/node.php2
-rw-r--r--apps/dav/tests/unit/connector/sabre/node.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/dav/lib/connector/sabre/node.php b/apps/dav/lib/connector/sabre/node.php
index 41dcb421913..95a5f0a8749 100644
--- a/apps/dav/lib/connector/sabre/node.php
+++ b/apps/dav/lib/connector/sabre/node.php
@@ -230,7 +230,7 @@ abstract class Node implements \Sabre\DAV\INode {
if ($this->info->isDeletable()) {
$p .= 'D';
}
- if ($this->info->isDeletable()) {
+ if ($this->info->isUpdateable()) {
$p .= 'NV'; // Renameable, Moveable
}
if ($this->info->getType() === \OCP\Files\FileInfo::TYPE_FILE) {
diff --git a/apps/dav/tests/unit/connector/sabre/node.php b/apps/dav/tests/unit/connector/sabre/node.php
index dfbd95bfad8..8c92c2f063c 100644
--- a/apps/dav/tests/unit/connector/sabre/node.php
+++ b/apps/dav/tests/unit/connector/sabre/node.php
@@ -31,8 +31,8 @@ class Node extends \Test\TestCase {
array(\OCP\Constants::PERMISSION_ALL, 'file', true, false, 'SRDNVW'),
array(\OCP\Constants::PERMISSION_ALL, 'file', true, true, 'SRMDNVW'),
array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_SHARE, 'file', true, false, 'SDNVW'),
- array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_UPDATE, 'file', false, false, 'RDNV'),
- array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_DELETE, 'file', false, false, 'RW'),
+ array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_UPDATE, 'file', false, false, 'RD'),
+ array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_DELETE, 'file', false, false, 'RNVW'),
array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE, 'file', false, false, 'RDNVW'),
array(\OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE, 'dir', false, false, 'RDNV'),
);