Skip to content

Commit b32f30e

Browse files
PVince81backportbot[bot]
authored andcommitted
Hide expiration date field for remote shares
Remote shares currently do not support expiration date. Signed-off-by: Vincent Petry <[email protected]>
1 parent 6db5324 commit b32f30e

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

apps/files_sharing/src/components/SharingEntry.vue

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,16 @@
7777
</ActionCheckbox>
7878

7979
<!-- expiration date -->
80-
<ActionCheckbox :checked.sync="hasExpirationDate"
80+
<ActionCheckbox
81+
v-if="canHaveExpirationDate"
82+
:checked.sync="hasExpirationDate"
8183
:disabled="config.isDefaultInternalExpireDateEnforced || saving"
8284
@uncheck="onExpirationDisable">
8385
{{ config.isDefaultInternalExpireDateEnforced
8486
? t('files_sharing', 'Expiration date enforced')
8587
: t('files_sharing', 'Set expiration date') }}
8688
</ActionCheckbox>
87-
<ActionInput v-if="hasExpirationDate"
89+
<ActionInput v-if="canHaveExpirationDate && hasExpirationDate"
8890
ref="expireDate"
8991
v-tooltip.auto="{
9092
content: errors.expireDate,
@@ -215,8 +217,16 @@ export default {
215217
},
216218
217219
canHaveNote() {
218-
return this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE
219-
&& this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
220+
return !this.isRemoteShare
221+
},
222+
223+
canHaveExpirationDate() {
224+
return !this.isRemoteShare
225+
},
226+
227+
isRemoteShare() {
228+
return this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE
229+
|| this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
220230
},
221231
222232
/**

0 commit comments

Comments
 (0)