mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
Merge pull request #20842 from nextcloud/backport/20832/stable18
[stable18] Do not filter id matching userId on non-user-share shares
This commit is contained in:
commit
b2cd82d795
4 changed files with 9 additions and 7 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -606,12 +606,12 @@ class ShareAPIController extends OCSController {
|
|||
|
||||
$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);
|
||||
|
|
@ -656,7 +656,8 @@ class ShareAPIController extends OCSController {
|
|||
$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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue