Skip to content

Commit

Permalink
fix: Only show share permission if re-sharable
Browse files Browse the repository at this point in the history
Signed-off-by: nfebe <fenn25.fn@gmail.com>
  • Loading branch information
nfebe committed Nov 18, 2024
1 parent 08dc4aa commit aef75b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
data-cy-files-sharing-share-permissions-checkbox="update">
{{ t('files_sharing', 'Edit') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-if="config.isResharingAllowed && share.type !== ShareType.Link"
<NcCheckboxRadioSwitch v-if="resharingIsPossible"
:disabled="!canSetReshare"
:checked.sync="canReshare"
data-cy-files-sharing-share-permissions-checkbox="share">
Expand Down Expand Up @@ -556,6 +556,9 @@ export default {
return t('files_sharing', 'Update share')

},
resharingIsPossible() {
return this.config.isResharingAllowed && (this.share.type !== ShareType.Link || this.share.type !== ShareType.Email)
},
/**
* Can the sharer set whether the sharee can edit the file ?
*
Expand Down

0 comments on commit aef75b5

Please sign in to comment.