diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-06 09:24:22 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-06 09:24:22 +0200 |
commit | da640adf688baef651df08a81e04089553a6c3a0 (patch) | |
tree | 260bf6b81449773479afab5cb3045f0bcb73f18f /lib | |
parent | 822e8fbfe10c287218d66674d7f5749a4f1b7c2f (diff) | |
parent | 1c7244c1201ac607cc1b244551fa8f5282572ba7 (diff) | |
download | nextcloud-server-da640adf688baef651df08a81e04089553a6c3a0.tar.gz nextcloud-server-da640adf688baef651df08a81e04089553a6c3a0.zip |
Merge pull request #19577 from owncloud/share-donotreturnentrieswhenusernotingroup
Remove invalid share items from result when missing group membership
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/share/share.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 42fec03d3ae..ca94c51cf76 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -1908,6 +1908,12 @@ class Share extends Constants { $items = array_merge($items, $collectionItems); } + // filter out invalid items, these can appear when subshare entries exist + // for a group in which the requested user isn't a member any more + $items = array_filter($items, function($item) { + return $item['share_type'] !== self::$shareTypeGroupUserUnique; + }); + return self::formatResult($items, $column, $backend, $format, $parameters); } elseif ($includeCollections && $collectionTypes && in_array('folder', $collectionTypes)) { // FIXME: Thats a dirty hack to improve file sharing performance, |