Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-06-06 15:39:02 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2016-06-06 15:39:02 +0300
commit1b5368bbaf3a57d6c12fbace78ff7ba0a4c4024b (patch)
treeea81881b51dfe91d2d6bb0e85e6d2067b70a9a9f /apps/dav/appinfo/v1/publicwebdav.php
parentc0a91ddca797c9821d3ce8771664b17ee588535f (diff)
Wrap publicwebdav in sharePermission mask
Fixes #24868 The writable mask was a bit misleading. We should wrap with the sharepermissions (as they are used everywhere else). The PERMISSIONS_SHARE are added since that is required for the public link check plugin.
Diffstat (limited to 'apps/dav/appinfo/v1/publicwebdav.php')
-rw-r--r--apps/dav/appinfo/v1/publicwebdav.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/dav/appinfo/v1/publicwebdav.php b/apps/dav/appinfo/v1/publicwebdav.php
index c6aaab2712f..07004f43bd7 100644
--- a/apps/dav/appinfo/v1/publicwebdav.php
+++ b/apps/dav/appinfo/v1/publicwebdav.php
@@ -66,14 +66,11 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authBackend, func
$share = $authBackend->getShare();
$owner = $share->getShareOwner();
- $isWritable = $share->getPermissions() & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE);
$fileId = $share->getNodeId();
- if (!$isWritable) {
- \OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) {
- return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => \OCP\Constants::PERMISSION_READ + \OCP\Constants::PERMISSION_SHARE));
- });
- }
+ \OC\Files\Filesystem::addStorageWrapper('sharePermissions', function ($mountPoint, $storage) use ($share) {
+ return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => $share->getPermissions() | \OCP\Constants::PERMISSION_SHARE));
+ });
OC_Util::setupFS($owner);
$ownerView = \OC\Files\Filesystem::getView();