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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-11-28 22:16:32 +0300
committerGitHub <noreply@github.com>2017-11-28 22:16:32 +0300
commit90feccf4be7a1d9765e0a8769ce280775810d3fe (patch)
treec835de6f4b68d5e975193c86427c4ecff2e1b872 /lib
parent036eae6956ca4a53c7487be10494574bace0ce79 (diff)
parent76a2fb0231acf86d87cb6d8026e7f08936a21f15 (diff)
Merge pull request #7328 from nextcloud/backport/7327/access-list-regression-for-not-current-accesss
[stable12] Only in case of $currentAccess the array uses the id as index
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index be019852ff3..46b47920ce1 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1407,7 +1407,13 @@ class Manager implements IManager {
foreach ($tmp as $k => $v) {
if (isset($al[$k])) {
if (is_array($al[$k])) {
- $al[$k] += $v;
+ if ($currentAccess) {
+ $al[$k] += $v;
+ } else {
+ $al[$k] = array_merge($al[$k], $v);
+ $al[$k] = array_unique($al[$k]);
+ $al[$k] = array_values($al[$k]);
+ }
} else {
$al[$k] = $al[$k] || $v;
}