Do not filter id matching userId on non-user-share shares

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2020-05-05 18:46:24 +02:00
parent 32e56dee89
commit a26ca1e638
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
4 changed files with 10 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -613,12 +613,12 @@ class ShareAPIController extends OCSController {
$shares = array_merge($userShares, $groupShares, $circleShares, $roomShares); $shares = array_merge($userShares, $groupShares, $circleShares, $roomShares);
$shares = array_filter($shares, function (IShare $share) { $filteredShares = array_filter($shares, function (IShare $share) {
return $share->getShareOwner() !== $this->currentUser; return $share->getShareOwner() !== $this->currentUser;
}); });
$formatted = []; $formatted = [];
foreach ($shares as $share) { foreach ($filteredShares as $share) {
if ($this->canAccessShare($share)) { if ($this->canAccessShare($share)) {
try { try {
$formatted[] = $this->formatShare($share); $formatted[] = $this->formatShare($share);
@ -791,7 +791,8 @@ class ShareAPIController extends OCSController {
continue; continue;
} }
if (in_array($share->getId(), $known) || $share->getSharedWith() === $this->currentUser) { if (in_array($share->getId(), $known)
|| ($share->getSharedWith() === $this->currentUser && $share->getShareType() === IShare::TYPE_USER)) {
continue; continue;
} }

View File

@ -23,6 +23,7 @@
<template> <template>
<li class="sharing-entry"> <li class="sharing-entry">
<Avatar class="sharing-entry__avatar" <Avatar class="sharing-entry__avatar"
:is-no-user="share.type !== SHARE_TYPES.SHARE_TYPE_USER"
:user="share.shareWith" :user="share.shareWith"
:display-name="share.shareWithDisplayName" :display-name="share.shareWithDisplayName"
:url="share.shareWithAvatar" /> :url="share.shareWithAvatar" />