Merge pull request #46364 from nextcloud/backport/46321/stable28

[stable28] fix(SharingDetailsView): Prevent illegal unselection of read permissions
This commit is contained in:
F. E Noel Nfebe 2024-07-09 14:44:03 +01:00 committed by GitHub
commit 19ab1ffd0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 14 additions and 7 deletions

View file

@ -566,6 +566,9 @@ export default {
// allowed to revoke it too (but not to grant it again).
return (this.fileInfo.canDownload() || this.canDownload)
},
canRemoveReadPermission() {
return this.allowsFileDrop && this.share.type === this.SHARE_TYPES.SHARE_TYPE_LINK
},
// if newPassword exists, but is empty, it means
// the user deleted the original password
hasUnsavedPassword() {
@ -774,6 +777,10 @@ export default {
this.setCustomPermissions = true
}
}
// Read permission required for share creation
if (!this.canRemoveReadPermission) {
this.hasRead = true
}
},
handleCustomPermissions() {
if (!this.isNewShare && (this.hasCustomPermissions || this.share.setCustomPermissions)) {

3
dist/7144-7144.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/7144-7144.js.map vendored Normal file

File diff suppressed because one or more lines are too long

3
dist/7822-7822.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long