mirror of
https://github.com/nextcloud/server.git
synced 2026-06-05 23:06:48 -04:00
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:
parent
21226928fc
commit
710287f6c8
8 changed files with 14 additions and 7 deletions
|
|
@ -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
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
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
3
dist/7822-7822.js
vendored
File diff suppressed because one or more lines are too long
1
dist/7822-7822.js.map
vendored
1
dist/7822-7822.js.map
vendored
File diff suppressed because one or more lines are too long
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