fix(share): assume download enabled on federated share

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2025-04-29 15:33:42 -01:00 committed by Andy Scherzinger
parent 1c2e47231b
commit 9a5e27d5b4

View file

@ -2089,6 +2089,8 @@ class ShareAPIController extends OCSController {
$hideDownload = $hideDownload && $originalShare->getHideDownload();
// allow download if already allowed by previous share or when the current share allows downloading
$canDownload = $canDownload || $inheritedAttributes === null || $inheritedAttributes->getAttribute('permissions', 'download') !== false;
} elseif ($node->getStorage()->instanceOfStorage(Storage::class)) {
$canDownload = true; // in case of federation storage, we can expect the download to be activated by default
}
}