diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-06-10 18:29:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-10 18:29:09 +0200 |
commit | 842cc2a7889d1ff8004fddd2546aec1232e0eaed (patch) | |
tree | e309a759b4ebee9ab9fa32d839d8ebb819c145f6 /apps/dav | |
parent | 74580daa23016fab370b2f6c14d82401032733cb (diff) | |
parent | 54e2ac57130666add0ad5d3c583c6f29527b4ebc (diff) | |
download | nextcloud-server-842cc2a7889d1ff8004fddd2546aec1232e0eaed.tar.gz nextcloud-server-842cc2a7889d1ff8004fddd2546aec1232e0eaed.zip |
Merge pull request #19 from nextcloud/files-drop
add "hide file list" option
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/appinfo/v1/publicwebdav.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dav/appinfo/v1/publicwebdav.php b/apps/dav/appinfo/v1/publicwebdav.php index c6aaab2712f..c6c319aa36d 100644 --- a/apps/dav/appinfo/v1/publicwebdav.php +++ b/apps/dav/appinfo/v1/publicwebdav.php @@ -67,8 +67,13 @@ $server = $serverFactory->createServer($baseuri, $requestUri, $authBackend, func $share = $authBackend->getShare(); $owner = $share->getShareOwner(); $isWritable = $share->getPermissions() & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE); + $isReadable = $share->getPermissions() & \OCP\Constants::PERMISSION_READ; $fileId = $share->getNodeId(); + if (!$isReadable) { + return false; + } + 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)); |