summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/components/SharingEntryLink.vue
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntryLink.vue')
-rw-r--r--apps/files_sharing/src/components/SharingEntryLink.vue10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue
index 672b32c1cd1..328d0108332 100644
--- a/apps/files_sharing/src/components/SharingEntryLink.vue
+++ b/apps/files_sharing/src/components/SharingEntryLink.vue
@@ -159,7 +159,7 @@
<ActionSeparator />
<ActionCheckbox :checked.sync="share.hideDownload"
- :disabled="saving"
+ :disabled="saving || canChangeHideDownload"
@change="queueUpdate('hideDownload')">
{{ t('files_sharing', 'Hide download') }}
</ActionCheckbox>
@@ -607,6 +607,12 @@ export default {
isPasswordPolicyEnabled() {
return typeof this.config.passwordPolicy === 'object'
},
+
+ canChangeHideDownload() {
+ const hasDisabledDownload = (shareAttribute) => shareAttribute.key === 'download' && shareAttribute.scope === 'permissions' && shareAttribute.enabled === false
+
+ return this.fileInfo.shareAttributes.some(hasDisabledDownload)
+ },
},
methods: {
@@ -697,6 +703,7 @@ export default {
shareType: ShareTypes.SHARE_TYPE_LINK,
password: share.password,
expireDate: share.expireDate,
+ attributes: JSON.stringify(this.fileInfo.shareAttributes),
// we do not allow setting the publicUpload
// before the share creation.
// Todo: We also need to fix the createShare method in
@@ -867,7 +874,6 @@ export default {
this.$emit('remove:share', this.share)
},
},
-
}
</script>