Merge pull request #25933 from nextcloud/bugfix/noid/remove-unsupported-remote-share-expiration

Hide expiration date field for remote shares
This commit is contained in:
Julius Härtl 2021-03-09 16:26:27 +01:00 committed by GitHub
commit bd79d7b918
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -84,14 +84,16 @@
</ActionCheckbox> </ActionCheckbox>
<!-- expiration date --> <!-- expiration date -->
<ActionCheckbox :checked.sync="hasExpirationDate" <ActionCheckbox
v-if="canHaveExpirationDate"
:checked.sync="hasExpirationDate"
:disabled="config.isDefaultInternalExpireDateEnforced || saving" :disabled="config.isDefaultInternalExpireDateEnforced || saving"
@uncheck="onExpirationDisable"> @uncheck="onExpirationDisable">
{{ config.isDefaultInternalExpireDateEnforced {{ config.isDefaultInternalExpireDateEnforced
? t('files_sharing', 'Expiration date enforced') ? t('files_sharing', 'Expiration date enforced')
: t('files_sharing', 'Set expiration date') }} : t('files_sharing', 'Set expiration date') }}
</ActionCheckbox> </ActionCheckbox>
<ActionInput v-if="hasExpirationDate" <ActionInput v-if="canHaveExpirationDate && hasExpirationDate"
ref="expireDate" ref="expireDate"
v-tooltip.auto="{ v-tooltip.auto="{
content: errors.expireDate, content: errors.expireDate,
@ -222,8 +224,16 @@ export default {
}, },
canHaveNote() { canHaveNote() {
return this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE return !this.isRemoteShare
&& this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP },
canHaveExpirationDate() {
return !this.isRemoteShare
},
isRemoteShare() {
return this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE
|| this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
}, },
/** /**