Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/groupfolders.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/ACL
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-06-19 18:30:12 +0300
committerRobin Appelman <robin@icewind.nl>2019-06-19 18:30:12 +0300
commit8e9318406deeb2237b1abeb9c0c9b76e86c512df (patch)
tree75a8ab3b0ee55320f1812c3a4731f4d4050e0a5f /lib/ACL
parent3d5cd6ac5038230eb8bfdf7c1ba2c6bb738373e1 (diff)
fix handling of cached rules
Diffstat (limited to 'lib/ACL')
-rw-r--r--lib/ACL/ACLManager.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ACL/ACLManager.php b/lib/ACL/ACLManager.php
index 300074d7..aa5c1c0f 100644
--- a/lib/ACL/ACLManager.php
+++ b/lib/ACL/ACLManager.php
@@ -30,7 +30,7 @@ use OCP\IUserSession;
class ACLManager {
private $ruleManager;
private $ruleCache;
- private $user;
+ public $user;
/** @var int|null */
private $rootStorageId = null;
private $rootFolderProvider;
@@ -69,9 +69,9 @@ class ACLManager {
*/
private function getRules(array $paths): array {
if ($this->pathsAreCached($paths)) {
- $rules = array_map(function (string $path) {
+ $rules = array_combine($paths, array_map(function (string $path) {
return $this->ruleCache->get($path);
- }, $paths);
+ }, $paths));
} else {
$rules = $this->ruleManager->getRulesForFilesByPath($this->user, $this->getRootStorageId(), $paths);
foreach ($rules as $path => $rulesForPath) {