From 0184dac57208947468e5d803910af2b434037479 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Tue, 29 Apr 2025 15:33:42 -0100 Subject: [PATCH] fix(share): assume download enabled on federated share Signed-off-by: Maxence Lange --- apps/files_sharing/lib/Controller/ShareAPIController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 94d1917cc4251..6557dd34c9d7b 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -2093,6 +2093,8 @@ private function checkInheritedAttributes(IShare $share): void { $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 } }