aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Controller/PublicPreviewController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/Controller/PublicPreviewController.php')
-rw-r--r--apps/files_sharing/lib/Controller/PublicPreviewController.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/PublicPreviewController.php b/apps/files_sharing/lib/Controller/PublicPreviewController.php
index 98c4d8cafb4..ee11cf5f3f0 100644
--- a/apps/files_sharing/lib/Controller/PublicPreviewController.php
+++ b/apps/files_sharing/lib/Controller/PublicPreviewController.php
@@ -109,6 +109,11 @@ class PublicPreviewController extends PublicShareController {
return new DataResponse([], Http::STATUS_FORBIDDEN);
}
+ $attributes = $share->getAttributes();
+ if ($attributes !== null && $attributes->getAttribute('permissions', 'download') === false) {
+ return new DataResponse([], Http::STATUS_FORBIDDEN);
+ }
+
try {
$node = $share->getNode();
if ($node instanceof Folder) {
@@ -159,6 +164,11 @@ class PublicPreviewController extends PublicShareController {
return new DataResponse([], Http::STATUS_FORBIDDEN);
}
+ $attributes = $share->getAttributes();
+ if ($attributes !== null && $attributes->getAttribute('permissions', 'download') === false) {
+ return new DataResponse([], Http::STATUS_FORBIDDEN);
+ }
+
try {
$node = $share->getNode();
if ($node instanceof Folder) {