diff options
author | nfebe <fenn25.fn@gmail.com> | 2025-02-19 09:33:25 +0100 |
---|---|---|
committer | nfebe <fenn25.fn@gmail.com> | 2025-02-19 09:33:29 +0100 |
commit | e8164cc664713fd693dd6ed1cb62fe7f0b972e64 (patch) | |
tree | fa109bff963941243061f871b32dbe71dab94de7 | |
parent | 0d49af4f2789c7bb93fb970032342fc06893948f (diff) | |
download | nextcloud-server-fix/allow-download-with-hide-download-flag.tar.gz nextcloud-server-fix/allow-download-with-hide-download-flag.zip |
fix(files_sharing): Hide download should not prevent downloadfix/allow-download-with-hide-download-flag
Hide download is meant to hide the download button from the UI not enforce
the `download:false` attribute.
This commit also modifies the advanced options to only show "Allow download and sync" on
public shares.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 5 | ||||
-rw-r--r-- | apps/files_sharing/src/views/SharingDetailsTab.vue | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 25e552e35ad..3124db12d2b 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -1288,16 +1288,11 @@ class ShareAPIController extends OCSController { || $share->getShareType() === IShare::TYPE_EMAIL) { // Update hide download state - $attributes = $share->getAttributes() ?? $share->newAttributes(); if ($hideDownload === 'true') { $share->setHideDownload(true); - $attributes->setAttribute('permissions', 'download', false); } elseif ($hideDownload === 'false') { $share->setHideDownload(false); - $attributes->setAttribute('permissions', 'download', true); } - $share->setAttributes($attributes); - // If either manual permissions are specified or publicUpload // then we need to also update the permissions of the share diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index b0369df6339..aedd3878398 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -169,7 +169,7 @@ @update:checked="queueUpdate('hideDownload')"> {{ t('files_sharing', 'Hide download') }} </NcCheckboxRadioSwitch> - <NcCheckboxRadioSwitch v-else + <NcCheckboxRadioSwitch v-if="isPublicShare" :disabled="!canSetDownload" :checked.sync="canDownload" data-cy-files-sharing-share-permissions-checkbox="download"> @@ -930,6 +930,7 @@ export default { this.setCustomPermissions = true } } + // Read permission required for share creation if (!this.canRemoveReadPermission) { this.hasRead = true |