Cache sharing disabled in the view

This commit is contained in:
Robin Appelman 2015-12-30 14:42:12 +01:00
parent 9c4ab51735
commit 45d0396404
1 changed files with 3 additions and 2 deletions

View File

@ -1339,11 +1339,12 @@ class View {
$folderId = $data['fileid'];
$contents = $cache->getFolderContentsById($folderId); //TODO: mimetype_filter
$sharingDisabled = \OCP\Util::isSharingDisabledForUser();
/**
* @var \OC\Files\FileInfo[] $files
*/
$files = array_map(function (array $content) use ($path, $storage, $mount) {
if (\OCP\Util::isSharingDisabledForUser()) {
$files = array_map(function (array $content) use ($path, $storage, $mount, $sharingDisabled) {
if ($sharingDisabled) {
$content['permissions'] = $content['permissions'] & ~\OCP\Constants::PERMISSION_SHARE;
}
$owner = $this->getUserObjectForOwner($storage->getOwner($content['path']));