Skip to content

Commit ba6d74b

Browse files
ArtificialOwlAndyScherzinger
authored andcommitted
fix(share): assume download enabled on federated share
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
1 parent f85ccc2 commit ba6d74b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/files_sharing/lib/Controller/ShareAPIController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2118,6 +2118,8 @@ private function checkInheritedAttributes(IShare $share): void {
21182118
$hideDownload = $hideDownload && $originalShare->getHideDownload();
21192119
// allow download if already allowed by previous share or when the current share allows downloading
21202120
$canDownload = $canDownload || $inheritedAttributes === null || $inheritedAttributes->getAttribute('permissions', 'download') !== false;
2121+
} elseif ($node->getStorage()->instanceOfStorage(Storage::class)) {
2122+
$canDownload = true; // in case of federation storage, we can expect the download to be activated by default
21212123
}
21222124
}
21232125

0 commit comments

Comments
 (0)