Skip to content

Commit

Permalink
Merge pull request #46364 from nextcloud/backport/46321/stable28
Browse files Browse the repository at this point in the history
[stable28] fix(SharingDetailsView): Prevent illegal unselection of read permissions
  • Loading branch information
nfebe authored Jul 9, 2024
2 parents 2595e48 + 710287f commit 19ab1ff
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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)) {
Expand Down
3 changes: 3 additions & 0 deletions dist/7144-7144.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/7144-7144.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions dist/7822-7822.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/7822-7822.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

0 comments on commit 19ab1ff

Please sign in to comment.