diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-04-14 14:55:34 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-04-16 20:38:20 +0200 |
commit | e2df8f3d69d2758d554e7d6a27f70fb7bc2aedae (patch) | |
tree | 8c1726f787da92263c0e74b545b2f130b4b80353 /apps/files_sharing/src | |
parent | 47d1afbb7f07e1990be0d0c0a763f5ba1c8c000f (diff) | |
download | nextcloud-server-e2df8f3d69d2758d554e7d6a27f70fb7bc2aedae.tar.gz nextcloud-server-e2df8f3d69d2758d554e7d6a27f70fb7bc2aedae.zip |
fix(files_sharing): allow to disable share download permission
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r-- | apps/files_sharing/src/models/Share.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/files_sharing/src/models/Share.ts b/apps/files_sharing/src/models/Share.ts index 39907b03025..fb76a655d53 100644 --- a/apps/files_sharing/src/models/Share.ts +++ b/apps/files_sharing/src/models/Share.ts @@ -252,6 +252,15 @@ export default class Share { * Hide the download button on public page */ set hideDownload(state: boolean) { + // disabling hide-download also enables the download permission + // needed for regression in Nextcloud 31.0.0 until (incl.) 31.0.3 + if (!state) { + const attribute = this.attributes.find(({ key, scope }) => key === 'download' && scope === 'permissions') + if (attribute) { + attribute.value = true + } + } + this._share.hide_download = state === true } |