mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Fix public share webdav permissions
This commit is contained in:
parent
49f9b7ea8e
commit
4bc8a2550d
2 changed files with 2 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue