aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-04-10 16:22:12 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-04-13 12:58:52 +0200
commit5b57bb955b6f5289bf80aac7ade760d76ce033c6 (patch)
tree8c2af923475c5c310f938af84f56371e9b01c75c /lib
parent2fcf334c6aeafaf13f3f1eee6479db93cec2e576 (diff)
downloadnextcloud-server-5b57bb955b6f5289bf80aac7ade760d76ce033c6.tar.gz
nextcloud-server-5b57bb955b6f5289bf80aac7ade760d76ce033c6.zip
Fix default share provider
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 49a756f2a10..b28dc56f852 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -1128,17 +1128,18 @@ class DefaultShareProvider implements IShareProvider {
}
} else if ($type === \OCP\Share::SHARE_TYPE_LINK) {
$link = true;
- } else if ($type === self::SHARE_TYPE_USERGROUP) {
- if ($currentAccess === true) {
- $uid = $row['share_with'];
- $users[$uid] = isset($users[$uid]) ? $users[$uid] : [];
- $users[$uid][$row['id']] = $row;
- }
+ } else if ($type === self::SHARE_TYPE_USERGROUP && $currentAccess === true) {
+ $uid = $row['share_with'];
+ $users[$uid] = isset($users[$uid]) ? $users[$uid] : [];
+ $users[$uid][$row['id']] = $row;
}
}
$cursor->closeCursor();
$users = array_map([$this, 'filterSharesOfUser'], $users);
+ if ($currentAccess === true) {
+ $users = array_filter($users);
+ }
return ['users' => $users, 'public' => $link];
}