mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
Merge pull request #47638 from nextcloud/fix/share-attributes-null
fix: Properly handle share attributes if set to null
This commit is contained in:
commit
7362ede426
9 changed files with 18 additions and 9 deletions
|
|
@ -423,13 +423,22 @@ export default {
|
|||
*/
|
||||
canDownload: {
|
||||
get() {
|
||||
return this.share.attributes.find(attr => attr.key === 'download')?.value || false
|
||||
return this.share.attributes?.find(attr => attr.key === 'download')?.value ?? true
|
||||
},
|
||||
set(checked) {
|
||||
// Find the 'download' attribute and update its value
|
||||
const downloadAttr = this.share.attributes.find(attr => attr.key === 'download')
|
||||
const downloadAttr = this.share.attributes?.find(attr => attr.key === 'download')
|
||||
if (downloadAttr) {
|
||||
downloadAttr.value = checked
|
||||
} else {
|
||||
if (this.share.attributes === null) {
|
||||
this.$set(this.share, 'attributes', [])
|
||||
}
|
||||
this.share.attributes.push({
|
||||
scope: 'permissions',
|
||||
key: 'download',
|
||||
value: checked,
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
1
dist/5643-5643.js.map
vendored
1
dist/5643-5643.js.map
vendored
File diff suppressed because one or more lines are too long
1
dist/5643-5643.js.map.license
vendored
1
dist/5643-5643.js.map.license
vendored
|
|
@ -1 +0,0 @@
|
|||
5643-5643.js.license
|
||||
4
dist/5643-5643.js → dist/8215-8215.js
vendored
4
dist/5643-5643.js → dist/8215-8215.js
vendored
File diff suppressed because one or more lines are too long
1
dist/8215-8215.js.map
vendored
Normal file
1
dist/8215-8215.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/8215-8215.js.map.license
vendored
Symbolic link
1
dist/8215-8215.js.map.license
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
8215-8215.js.license
|
||||
4
dist/files_sharing-files_sharing_tab.js
vendored
4
dist/files_sharing-files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing_tab.js.map
vendored
2
dist/files_sharing-files_sharing_tab.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue