Skip to content

Commit 7e71abe

Browse files
committed
fix(files_sharing): allow to disable share download permission
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent 03407c8 commit 7e71abe

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

apps/files_sharing/src/models/Share.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,15 @@ export default class Share {
252252
* Hide the download button on public page
253253
*/
254254
set hideDownload(state: boolean) {
255+
// disabling hide-download also enables the download permission
256+
// needed for regression in Nextcloud 31.0.0 until (incl.) 31.0.3
257+
if (!state) {
258+
const attribute = this.attributes.find(({ key, scope }) => key === 'download' && scope === 'permissions')
259+
if (attribute) {
260+
attribute.value = true
261+
}
262+
}
263+
255264
this._share.hide_download = state === true
256265
}
257266

0 commit comments

Comments
 (0)