aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index d11834e1e07..b3c9f1af292 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -2038,6 +2038,13 @@ class ShareAPIController extends OCSController {
$formattedShareAttributes = \json_decode($attributesString, true);
if (is_array($formattedShareAttributes)) {
foreach ($formattedShareAttributes as $formattedAttr) {
+ if ($formattedAttr['scope'] === 'permissions' && $formattedAttr['key'] === 'download') {
+ try {
+ $this->logger->warning('Setting download permission on share', ['share_path' => $share->getNode()->getInternalPath(), 'trace' => debug_backtrace()]);
+ } catch (NotFoundException $e) {
+ // pass
+ }
+ }
$newShareAttributes->setAttribute(
$formattedAttr['scope'],
$formattedAttr['key'],
@@ -2099,6 +2106,11 @@ class ShareAPIController extends OCSController {
if (!$canDownload) {
$attributes = $share->getAttributes() ?? $share->newAttributes();
+ try {
+ $this->logger->warning('Setting download permission to false on share', ['share_path' => $share->getNode()->getInternalPath(), 'trace' => debug_backtrace()]);
+ } catch (NotFoundException $e) {
+ // pass
+ }
$attributes->setAttribute('permissions', 'download', false);
$share->setAttributes($attributes);
}