File tree Expand file tree Collapse file tree
apps/files_sharing/src/views Expand file tree Collapse file tree Original file line number Diff line number Diff line change 150150 {{ t('files_sharing', 'Custom permissions') }}
151151 </NcCheckboxRadioSwitch >
152152 <section v-if =" setCustomPermissions" class =" custom-permissions-group" >
153- <NcCheckboxRadioSwitch :disabled =" ! allowsFileDrop && share . type === SHARE_TYPES . SHARE_TYPE_LINK "
153+ <NcCheckboxRadioSwitch :disabled =" ! canRemoveReadPermission "
154154 :checked .sync =" hasRead " >
155155 {{ t('files_sharing', 'Read') }}
156156 </NcCheckboxRadioSwitch >
@@ -534,6 +534,9 @@ export default {
534534 // allowed to revoke it too (but not to grant it again).
535535 return (this .fileInfo .canDownload () || this .canDownload )
536536 },
537+ canRemoveReadPermission () {
538+ return this .allowsFileDrop && this .share .type === this .SHARE_TYPES .SHARE_TYPE_LINK
539+ },
537540 // if newPassword exists, but is empty, it means
538541 // the user deleted the original password
539542 hasUnsavedPassword () {
@@ -736,6 +739,10 @@ export default {
736739 this .setCustomPermissions = true
737740 }
738741 }
742+ // Read permission required for share creation
743+ if (! this .canRemoveReadPermission ) {
744+ this .hasRead = true
745+ }
739746 },
740747 handleCustomPermissions () {
741748 if (! this .isNewShare && (this .hasCustomPermissions || this .share .setCustomPermissions )) {
You can’t perform that action at this time.
0 commit comments