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 180180 {{ t('files_sharing', 'Custom permissions') }}
181181 </NcCheckboxRadioSwitch >
182182 <section v-if =" setCustomPermissions" class =" custom-permissions-group" >
183- <NcCheckboxRadioSwitch :disabled =" !allowsFileDrop && share.type === SHARE_TYPES.SHARE_TYPE_LINK "
183+ <NcCheckboxRadioSwitch :disabled =" !canRemoveReadPermission "
184184 :checked.sync =" hasRead"
185185 data-cy-files-sharing-share-permissions-checkbox =" read" >
186186 {{ t('files_sharing', 'Read') }}
@@ -602,6 +602,9 @@ export default {
602602 // allowed to revoke it too (but not to grant it again).
603603 return (this .fileInfo .canDownload () || this .canDownload )
604604 },
605+ canRemoveReadPermission () {
606+ return this .allowsFileDrop && this .share .type === this .SHARE_TYPES .SHARE_TYPE_LINK
607+ },
605608 // if newPassword exists, but is empty, it means
606609 // the user deleted the original password
607610 hasUnsavedPassword () {
@@ -822,6 +825,10 @@ export default {
822825 this .setCustomPermissions = true
823826 }
824827 }
828+ // Read permission required for share creation
829+ if (! this .canRemoveReadPermission ) {
830+ this .hasRead = true
831+ }
825832 },
826833 handleCustomPermissions () {
827834 if (! this .isNewShare && (this .hasCustomPermissions || this .share .setCustomPermissions )) {
You can’t perform that action at this time.
0 commit comments