diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-10 14:33:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-10 14:33:06 +0200 |
commit | 57b999fde7cbfc06613c7a8bdff87febdb54b8fb (patch) | |
tree | 04980eb6af6afac900bc415919d3761354e53999 | |
parent | c668588e1757b16a9b9a8586ee2a2ab936cf1c72 (diff) | |
parent | 1b5368bbaf3a57d6c12fbace78ff7ba0a4c4024b (diff) | |
download | nextcloud-server-57b999fde7cbfc06613c7a8bdff87febdb54b8fb.tar.gz nextcloud-server-57b999fde7cbfc06613c7a8bdff87febdb54b8fb.zip |
Merge pull request #24990 from owncloud/fix_24868
Wrap publicwebdav in sharePermission mask
-rw-r--r-- | apps/dav/appinfo/v1/publicwebdav.php | 9 |
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(); |