aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/PreviewController.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Controller/PreviewController.php')
-rw-r--r--core/Controller/PreviewController.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php
index 7dd14b19f79..aac49c06d57 100644
--- a/core/Controller/PreviewController.php
+++ b/core/Controller/PreviewController.php
@@ -157,10 +157,7 @@ class PreviewController extends Controller {
if ($isNextcloudPreview === false && $storage->instanceOfStorage(ISharedStorage::class)) {
/** @var ISharedStorage $storage */
$share = $storage->getShare();
- $attributes = $share->getAttributes();
- // No "allow preview" header set, so we must check if
- // the share has not explicitly disabled download permissions
- if ($attributes?->getAttribute('permissions', 'download') === false) {
+ if (!$share->canSeeContent()) {
return new DataResponse([], Http::STATUS_FORBIDDEN);
}
}