aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-06-13 15:13:53 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-06-14 10:22:38 +0200
commit4bc8a2550d5558fba21f9b450f07d754dbb14d4b (patch)
tree3c7d7fae9c5d272a57b9e16081913a573c5c84c1 /apps
parent49f9b7ea8e59fa6c120a583fbf3fe9efd324c603 (diff)
downloadnextcloud-server-4bc8a2550d5558fba21f9b450f07d754dbb14d4b.tar.gz
nextcloud-server-4bc8a2550d5558fba21f9b450f07d754dbb14d4b.zip
Fix public share webdav permissions
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/ajax/shareinfo.php2
-rw-r--r--apps/files_sharing/publicwebdav.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/ajax/shareinfo.php b/apps/files_sharing/ajax/shareinfo.php
index e3735ddadd5..be26c357978 100644
--- a/apps/files_sharing/ajax/shareinfo.php
+++ b/apps/files_sharing/ajax/shareinfo.php
@@ -33,7 +33,7 @@ $linkItem = $data['linkItem'];
// Load the files
$path = $data['realPath'];
-$isWritable = $linkItem['permissions'] & \OCP\PERMISSION_CREATE;
+$isWritable = $linkItem['permissions'] & (\OCP\PERMISSION_UPDATE | \OCP\PERMISSION_CREATE);
if (!$isWritable) {
\OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) {
return new \OCA\Files_Sharing\ReadOnlyWrapper(array('storage' => $storage));
diff --git a/apps/files_sharing/publicwebdav.php b/apps/files_sharing/publicwebdav.php
index b41d3a238ac..4c0eb1537cd 100644
--- a/apps/files_sharing/publicwebdav.php
+++ b/apps/files_sharing/publicwebdav.php
@@ -41,7 +41,7 @@ $server->addPlugin(new OC_Connector_Sabre_ExceptionLoggerPlugin('webdav'));
$server->subscribeEvent('beforeMethod', function () use ($server, $objectTree, $authBackend) {
$share = $authBackend->getShare();
$owner = $share['uid_owner'];
- $isWritable = $share['permissions'];
+ $isWritable = $share['permissions'] & (\OCP\PERMISSION_UPDATE | \OCP\PERMISSION_CREATE);
$fileId = $share['file_source'];
if (!$isWritable) {