diff options
-rw-r--r-- | apps/files_sharing/ajax/shareinfo.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/publicwebdav.php | 2 |
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) { |