Parcourir la source

Merge pull request #44500 from nextcloud/backport/44484/stable28

[stable28] fix(share): Send correct share attributes upon share creation
tags/v28.0.6rc1
Côme Chilliet il y a 1 mois
Parent
révision
369247338b
Aucun compte lié à l'adresse e-mail de l'auteur

+ 8
- 8
apps/files_sharing/src/views/SharingDetailsTab.vue Voir le fichier

@@ -373,10 +373,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
}
},
},
/**
@@ -680,7 +684,6 @@ export default {
isCreateChecked = this.canCreate,
isDeleteChecked = this.canDelete,
isReshareChecked = this.canReshare,
isDownloadChecked = this.canDownload,
} = {}) {
// calc permissions if checked
const permissions = 0
@@ -690,9 +693,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) {
@@ -854,8 +854,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 } : {}),
})
@@ -999,7 +999,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;

+ 3
- 0
dist/8094-8094.js
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


dist/8718-8718.js.LICENSE.txt → dist/8094-8094.js.LICENSE.txt Voir le fichier


+ 1
- 0
dist/8094-8094.js.map
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 0
- 3
dist/8718-8718.js
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 0
- 1
dist/8718-8718.js.map
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 2
- 2
dist/core-common.js
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 1
- 1
dist/core-common.js.map
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 2
- 2
dist/files_sharing-files_sharing_tab.js
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 1
- 1
dist/files_sharing-files_sharing_tab.js.map
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


Chargement…
Annuler
Enregistrer