mirror of
https://github.com/nextcloud/server.git
synced 2026-02-22 01:11:23 -05:00
fix(files_sharing): allow to disable share download permission
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
47d1afbb7f
commit
e2df8f3d69
1 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue