Skip to content

Commit a07d1e2

Browse files
committed
fixup! fix(ShareApiController): fix listing of remote shares for the owner
Signed-off-by: Simon L. <szaimen@e.mail.de>
1 parent 57967bb commit a07d1e2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/files_sharing/lib/Controller/ShareAPIController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,8 +1729,8 @@ private function getShareById(string $id): IShare {
17291729
'deck' => IShare::TYPE_DECK,
17301730
];
17311731

1732-
// Include federated sharing whenever the provider is available for the user.
1733-
if ($this->shareManager->shareProviderExists(IShare::TYPE_REMOTE)) {
1732+
// Add federated sharing as a provider only if it's allowed
1733+
if ($this->shareManager->outgoingServer2ServerSharesAllowed()) {
17341734
$providers['ocFederatedSharing'] = null; // No type check needed
17351735
}
17361736

@@ -1996,12 +1996,12 @@ private function getAllShares(?Node $path = null, bool $reshares = false) {
19961996
$deckShares = $this->shareManager->getSharesBy($this->userId, IShare::TYPE_DECK, $path, $reshares, -1, 0);
19971997

19981998
// FEDERATION
1999-
if ($this->shareManager->shareProviderExists(IShare::TYPE_REMOTE)) {
1999+
if ($this->shareManager->outgoingServer2ServerSharesAllowed()) {
20002000
$federatedShares = $this->shareManager->getSharesBy($this->userId, IShare::TYPE_REMOTE, $path, $reshares, -1, 0);
20012001
} else {
20022002
$federatedShares = [];
20032003
}
2004-
if ($this->shareManager->shareProviderExists(IShare::TYPE_REMOTE_GROUP)) {
2004+
if ($this->shareManager->outgoingServer2ServerSharesAllowed()) {
20052005
$federatedGroupShares = $this->shareManager->getSharesBy($this->userId, IShare::TYPE_REMOTE_GROUP, $path, $reshares, -1, 0);
20062006
} else {
20072007
$federatedGroupShares = [];

0 commit comments

Comments
 (0)