Merge pull request #52683 from nextcloud/backport/52543/stable31

[stable31] fix(share): assume download enabled on federated share
This commit is contained in:
Andy Scherzinger 2025-05-29 16:21:09 +02:00 committed by GitHub
commit c0a5ae88ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2118,6 +2118,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
}
}