Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul Ferreira Fuentes <Raudius@users.noreply.github.com>2022-10-17 11:37:35 +0300
committerGitHub <noreply@github.com>2022-10-17 11:37:35 +0300
commit616d42a28d8005460c56a453c7aa13eaca15f932 (patch)
tree2e027ff861be6bb25e1bc7ff1c0c5c9029556155
parentd2d2bb996e933154a7dd506203e1be3eb5404c09 (diff)
parent68b7df0654fde84cd09a696b85cf1b21f0e34863 (diff)
Merge pull request #2511 from nextcloud/bugfix/2496/share-copy
Only apply hideDownload if share attribute is actually false
-rw-r--r--lib/TokenManager.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/TokenManager.php b/lib/TokenManager.php
index d6f45153..054dc808 100644
--- a/lib/TokenManager.php
+++ b/lib/TokenManager.php
@@ -151,7 +151,6 @@ class TokenManager {
}
// disable download if at least one shared access has it disabled
-
foreach ($files as $file) {
$storage = $file->getStorage();
// using string as we have no guarantee that "files_sharing" app is loaded
@@ -162,7 +161,7 @@ class TokenManager {
/** @var SharedStorage $storage */
$share = $storage->getShare();
$attributes = $share->getAttributes();
- if ($attributes !== null && !$attributes->getAttribute('permissions', 'download')) {
+ if ($attributes !== null && $attributes->getAttribute('permissions', 'download') === false) {
$hideDownload = true;
break;
}