Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
  • Loading branch information
skjnldsv authored and npmbuildbot[bot] committed Jul 14, 2020
commit c966656cb89d30cbc70619326072f9e2e8cecbf1
6 changes: 3 additions & 3 deletions apps/files_sharing/js/dist/files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/files_sharing/js/dist/files_sharing_tab.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -606,12 +606,12 @@ private function getSharedWithMe($node, bool $includeTags): array {

$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;
});

$formatted = [];
foreach ($shares as $share) {
foreach ($filteredShares as $share) {
if ($this->canAccessShare($share)) {
try {
$formatted[] = $this->formatShare($share);
Expand Down Expand Up @@ -656,7 +656,8 @@ private function getSharesInDir(Node $folder): array {
$resharingRight = false;
$known = [];
foreach ($shares as $share) {
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;
}

Expand Down
1 change: 1 addition & 0 deletions apps/files_sharing/src/components/SharingEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<template>
<li class="sharing-entry">
<Avatar class="sharing-entry__avatar"
:is-no-user="share.type !== SHARE_TYPES.SHARE_TYPE_USER"
:user="share.shareWith"
:display-name="share.shareWithDisplayName"
:url="share.shareWithAvatar" />
Expand Down