Skip to content

Commit aad2177

Browse files
Hide expiration date field for remote shares
Remote shares currently do not support expiration date. Signed-off-by: Vincent Petry <vincent@nextcloud.com> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
1 parent 791868f commit aad2177

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

apps/files_sharing/js/dist/files_sharing_tab.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_sharing/js/dist/files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_sharing/src/components/SharingEntry.vue

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,16 @@
8181
</ActionCheckbox>
8282

8383
<!-- expiration date -->
84-
<ActionCheckbox :checked.sync="hasExpirationDate"
84+
<ActionCheckbox
85+
v-if="canHaveExpirationDate"
86+
:checked.sync="hasExpirationDate"
8587
:disabled="config.isDefaultInternalExpireDateEnforced || saving"
8688
@uncheck="onExpirationDisable">
8789
{{ config.isDefaultInternalExpireDateEnforced
8890
? t('files_sharing', 'Expiration date enforced')
8991
: t('files_sharing', 'Set expiration date') }}
9092
</ActionCheckbox>
91-
<ActionInput v-if="hasExpirationDate"
93+
<ActionInput v-if="canHaveExpirationDate && hasExpirationDate"
9294
ref="expireDate"
9395
v-tooltip.auto="{
9496
content: errors.expireDate,
@@ -219,8 +221,16 @@ export default {
219221
},
220222
221223
canHaveNote() {
222-
return this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE
223-
&& this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
224+
return !this.isRemoteShare
225+
},
226+
227+
canHaveExpirationDate() {
228+
return !this.isRemoteShare
229+
},
230+
231+
isRemoteShare() {
232+
return this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE
233+
|| this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
224234
},
225235
226236
/**

0 commit comments

Comments
 (0)