lib/private/legacy/util.php 1 location
|
@@ 167-172 (lines=6) @@
|
164 |
|
}); |
165 |
|
|
166 |
|
\OC\Files\Filesystem::addStorageWrapper('enable_sharing', function ($mountPoint, IStorage $storage, \OCP\Files\Mount\IMountPoint $mount) { |
167 |
|
if (!$mount->getOption('enable_sharing', true)) { |
168 |
|
return new \OC\Files\Storage\Wrapper\PermissionsMask([ |
169 |
|
'storage' => $storage, |
170 |
|
'mask' => \OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_SHARE |
171 |
|
]); |
172 |
|
} |
173 |
|
return $storage; |
174 |
|
}); |
175 |
|
|
apps/files_sharing/ajax/shareinfo.php 1 location
|
@@ 66-70 (lines=5) @@
|
63 |
|
$path = $data['realPath']; |
64 |
|
|
65 |
|
$isWritable = $linkItem['permissions'] & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE); |
66 |
|
if (!$isWritable) { |
67 |
|
\OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) { |
68 |
|
return new \OC\Files\Storage\Wrapper\PermissionsMask(['storage' => $storage, 'mask' => \OCP\Constants::PERMISSION_READ + \OCP\Constants::PERMISSION_SHARE]); |
69 |
|
}); |
70 |
|
} |
71 |
|
|
72 |
|
$rootInfo = \OC\Files\Filesystem::getFileInfo($path); |
73 |
|
$rootView = new \OC\Files\View(''); |