|
|
@@ -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; |
|
|
|
} |
|
|
|
|