diff options
Diffstat (limited to 'lib/private/files/view.php')
-rw-r--r-- | lib/private/files/view.php | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 0b8d336f260..71c4980db2d 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -826,8 +826,6 @@ class View { $data = null; if ($storage) { $cache = $storage->getCache($internalPath); - $permissionsCache = $storage->getPermissionsCache($internalPath); - $user = \OC_User::getUser(); if (!$cache->inCache($internalPath)) { if (!$storage->file_exists($internalPath)) { @@ -857,13 +855,6 @@ class View { } } } - - $permissions = $permissionsCache->get($data['fileid'], $user); - if ($permissions === -1) { - $permissions = $storage->getPermissions($internalPath); - $permissionsCache->set($data['fileid'], $user, $permissions); - } - $data['permissions'] = $permissions; } } if (!$data) { @@ -896,7 +887,6 @@ class View { list($storage, $internalPath) = Filesystem::resolvePath($path); if ($storage) { $cache = $storage->getCache($internalPath); - $permissionsCache = $storage->getPermissionsCache($internalPath); $user = \OC_User::getUser(); if ($cache->getStatus($internalPath) < Cache\Cache::COMPLETE) { @@ -913,7 +903,6 @@ class View { foreach ($contents as $content) { $files[] = new FileInfo($path . '/' . $content['name'], $storage, $content['path'], $content); } - $permissions = $permissionsCache->getDirectoryPermissions($folderId, $user); $ids = array(); foreach ($files as $i => $file) { @@ -922,7 +911,6 @@ class View { if (!isset($permissions[$file['fileid']])) { $permissions[$file['fileid']] = $storage->getPermissions($file['path']); - $permissionsCache->set($file['fileid'], $user, $permissions[$file['fileid']]); } $files[$i]['permissions'] = $permissions[$file['fileid']]; } @@ -954,12 +942,7 @@ class View { } else { //mountpoint in this folder, add an entry for it $rootEntry['name'] = $relativePath; $rootEntry['type'] = $rootEntry['mimetype'] === 'httpd/unix-directory' ? 'dir' : 'file'; - $subPermissionsCache = $subStorage->getPermissionsCache(''); - $permissions = $subPermissionsCache->get($rootEntry['fileid'], $user); - if ($permissions === -1) { - $permissions = $subStorage->getPermissions($rootEntry['path']); - $subPermissionsCache->set($rootEntry['fileid'], $user, $permissions); - } + $permissions = $rootEntry['permissions']; // do not allow renaming/deleting the mount point if they are not shared files/folders // for shared files/folders we use the permissions given by the owner if ($subStorage instanceof \OC\Files\Storage\Shared) { |