Skip to content

Commit eb68aec

Browse files
skjnldsvnpmbuildbot[bot]
authored andcommitted
Do not filter id matching userId on non-user-share shares
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
1 parent 32e56de commit eb68aec

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

apps/files_sharing/js/dist/files_sharing_tab.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_sharing/js/dist/files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_sharing/lib/Controller/ShareAPIController.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,12 +613,12 @@ private function getSharedWithMe($node, bool $includeTags): array {
613613

614614
$shares = array_merge($userShares, $groupShares, $circleShares, $roomShares);
615615

616-
$shares = array_filter($shares, function (IShare $share) {
616+
$filteredShares = array_filter($shares, function (IShare $share) {
617617
return $share->getShareOwner() !== $this->currentUser;
618618
});
619619

620620
$formatted = [];
621-
foreach ($shares as $share) {
621+
foreach ($filteredShares as $share) {
622622
if ($this->canAccessShare($share)) {
623623
try {
624624
$formatted[] = $this->formatShare($share);
@@ -791,7 +791,8 @@ private function getFormattedShares(
791791
continue;
792792
}
793793

794-
if (in_array($share->getId(), $known) || $share->getSharedWith() === $this->currentUser) {
794+
if (in_array($share->getId(), $known)
795+
|| $share->getSharedWith() === $this->currentUser && $share->getShareType() === IShare::TYPE_USER) {
795796
continue;
796797
}
797798

apps/files_sharing/src/components/SharingEntry.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<template>
2424
<li class="sharing-entry">
2525
<Avatar class="sharing-entry__avatar"
26+
:is-no-user="share.type !== SHARE_TYPES.SHARE_TYPE_USER"
2627
:user="share.shareWith"
2728
:display-name="share.shareWithDisplayName"
2829
:url="share.shareWithAvatar" />

0 commit comments

Comments
 (0)