aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2025-04-29 15:33:42 -0100
committerAndy Scherzinger <info@andy-scherzinger.de>2025-05-29 14:52:00 +0200
commitba6d74b6de5d5030d9fb26fe236a95c71e08e4d8 (patch)
treebff6af5935a76c6295f9851bdbf318601a759c6f
parentf85ccc26a41827a1b0323b82f2803a1ab0eda186 (diff)
downloadnextcloud-server-backport/52543/stable31.tar.gz
nextcloud-server-backport/52543/stable31.zip
fix(share): assume download enabled on federated sharebackport/52543/stable31
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index f452bd241a6..0ab3a02f2ff 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -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
}
}