aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorF. E Noel Nfebe <fenn25.fn@gmail.com>2024-07-09 14:44:03 +0100
committerGitHub <noreply@github.com>2024-07-09 14:44:03 +0100
commit19ab1ffd0b7a95430a9bd83d63ff5c52175c3280 (patch)
tree95dc66d088b35a055ba86f319387cae4ca4d814c /apps
parent2595e488fdd2bf6a59923f684b5ee47e2b0faa1d (diff)
parent710287f6c804987953053ba25dea364bbb2383be (diff)
downloadnextcloud-server-19ab1ffd0b7a95430a9bd83d63ff5c52175c3280.tar.gz
nextcloud-server-19ab1ffd0b7a95430a9bd83d63ff5c52175c3280.zip
Merge pull request #46364 from nextcloud/backport/46321/stable28
[stable28] fix(SharingDetailsView): Prevent illegal unselection of read permissions
Diffstat (limited to 'apps')
-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)) {