Browse Source

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>
tags/v19.0.0RC1
John Molakvoæ (skjnldsv) 4 years ago
parent
commit
a26ca1e638
No account linked to committer's email address

+ 3
- 3
apps/files_sharing/js/dist/files_sharing_tab.js
File diff suppressed because it is too large
View File


+ 1
- 1
apps/files_sharing/js/dist/files_sharing_tab.js.map
File diff suppressed because it is too large
View File


+ 5
- 4
apps/files_sharing/lib/Controller/ShareAPIController.php View File

@@ -221,7 +221,7 @@ class ShareAPIController extends OCSController {
if ($this->shareManager->outgoingServer2ServerSharesAllowed()) {
if ($share->getShareType() === IShare::TYPE_LINK
|| $share->getShareType() === IShare::TYPE_EMAIL) {
$result['permissions'] |= Constants::PERMISSION_SHARE;
$result['permissions'] |= Constants::PERMISSION_SHARE;
}
}

@@ -613,12 +613,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);
@@ -791,7 +791,8 @@ class ShareAPIController extends OCSController {
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;
}


+ 1
- 0
apps/files_sharing/src/components/SharingEntry.vue View File

@@ -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…
Cancel
Save