diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-06 17:23:14 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-06 17:23:14 +0100 |
commit | 002161857c3649b11406f0370005985b90848e50 (patch) | |
tree | 30626eb71238a12300cba63fd91cf6f2a7b1e1a3 /lib | |
parent | b6bc17d014edf71dc5ac6d85ecaa4d3b5c99acb2 (diff) | |
parent | 45d03964049d6fb42fde416e193d5cc9d9ed480e (diff) | |
download | nextcloud-server-002161857c3649b11406f0370005985b90848e50.tar.gz nextcloud-server-002161857c3649b11406f0370005985b90848e50.zip |
Merge pull request #21398 from owncloud/sharing-disabled-cache
Cache isSharingDisabledForUser
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/view.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 045af5fe82c..357f854e5e2 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -1342,11 +1342,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'])); |