aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorF. E Noel Nfebe <fenn25.fn@gmail.com>2024-03-27 00:56:56 +0100
committerGitHub <noreply@github.com>2024-03-27 00:56:56 +0100
commit7eb31de3490c81f65c934d33b60683ac2a1ec155 (patch)
tree14262f64bd1bf5cc14cf106d023b402276bac43d /apps
parentca4f337593a5815a7736b5ee2078ae9047a0829d (diff)
parentd5b65789e882eb84b708e2bd57034fe94b815cef (diff)
downloadnextcloud-server-7eb31de3490c81f65c934d33b60683ac2a1ec155.tar.gz
nextcloud-server-7eb31de3490c81f65c934d33b60683ac2a1ec155.zip
Merge pull request #44484 from nextcloud/44131-persist-initial-share-configs
fix(share): Send correct share attributes upon share creation
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/src/views/SharingDetailsTab.vue16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue
index fbe43a06c11..92222a05c5a 100644
--- a/apps/files_sharing/src/views/SharingDetailsTab.vue
+++ b/apps/files_sharing/src/views/SharingDetailsTab.vue
@@ -404,10 +404,14 @@ export default {
*/
canDownload: {
get() {
- return this.share.hasDownloadPermission
+ return this.share.attributes.find(attr => attr.key === 'download')?.enabled || false
},
set(checked) {
- this.updateAtomicPermissions({ isDownloadChecked: checked })
+ // Find the 'download' attribute and update its value
+ const downloadAttr = this.share.attributes.find(attr => attr.key === 'download')
+ if (downloadAttr) {
+ downloadAttr.enabled = checked
+ }
},
},
/**
@@ -723,7 +727,6 @@ export default {
isCreateChecked = this.canCreate,
isDeleteChecked = this.canDelete,
isReshareChecked = this.canReshare,
- isDownloadChecked = this.canDownload,
} = {}) {
// calc permissions if checked
const permissions = 0
@@ -733,9 +736,6 @@ export default {
| (isEditChecked ? ATOMIC_PERMISSIONS.UPDATE : 0)
| (isReshareChecked ? ATOMIC_PERMISSIONS.SHARE : 0)
this.share.permissions = permissions
- if (this.share.hasDownloadPermission !== isDownloadChecked) {
- this.$set(this.share, 'hasDownloadPermission', isDownloadChecked)
- }
},
expandCustomPermissions() {
if (!this.advancedSectionAccordionExpanded) {
@@ -909,8 +909,8 @@ export default {
shareType: share.shareType,
shareWith: share.shareWith,
permissions: share.permissions,
- attributes: JSON.stringify(fileInfo.shareAttributes),
expireDate: share.expireDate,
+ attributes: JSON.stringify(share.attributes),
...(share.note ? { note: share.note } : {}),
...(share.password ? { password: share.password } : {}),
})
@@ -1054,7 +1054,7 @@ export default {
flex-direction: column;
}
}
-
+
/* Target component based style in NcCheckboxRadioSwitch slot content*/
:deep(span.checkbox-content__text.checkbox-radio-switch__text) {
flex-wrap: wrap;