fix(SharingDetailsView): Prevent illegal unselection of read permissions

With the exception of "file drop" on link shares all other shares need the read permissions at least.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
fenn-cs 2024-07-05 15:47:41 +01:00 committed by nextcloud-command
parent 21226928fc
commit 710287f6c8
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