mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
use permissions mask wrapper instead of readonly wrapper
This commit is contained in:
parent
5caeda33f1
commit
365fafc9bc
2 changed files with 2 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ $path = $data['realPath'];
|
|||
$isWritable = $linkItem['permissions'] & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE);
|
||||
if (!$isWritable) {
|
||||
\OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) {
|
||||
return new \OCA\Files_Sharing\ReadOnlyWrapper(array('storage' => $storage));
|
||||
return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => \OCP\Constants::PERMISSION_READ + \OCP\Constants::PERMISSION_SHARE));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ $server->on('beforeMethod', function () use ($server, $objectTree, $authBackend)
|
|||
|
||||
if (!$isWritable) {
|
||||
\OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) {
|
||||
return new \OCA\Files_Sharing\ReadOnlyWrapper(array('storage' => $storage));
|
||||
return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => \OCP\Constants::PERMISSION_READ + \OCP\Constants::PERMISSION_SHARE));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue