aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src
diff options
context:
space:
mode:
authorfenn-cs <fenn25.fn@gmail.com>2024-07-05 15:47:41 +0100
committernextcloud-command <nextcloud-command@users.noreply.github.com>2024-07-09 11:43:07 +0000
commit710287f6c804987953053ba25dea364bbb2383be (patch)
treed90aebb0d2f3d9f451531d523e8e48c2e79b8113 /apps/files_sharing/src
parent21226928fc81aeb7118071ee91541d56569bd6df (diff)
downloadnextcloud-server-710287f6c804987953053ba25dea364bbb2383be.tar.gz
nextcloud-server-710287f6c804987953053ba25dea364bbb2383be.zip
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>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r--apps/files_sharing/src/views/SharingDetailsTab.vue7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue
index a1e9ac734e5..37be85c37d4 100644
--- a/apps/files_sharing/src/views/SharingDetailsTab.vue
+++ b/apps/files_sharing/src/views/SharingDetailsTab.vue
@@ -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)) {