aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/components/SharingEntry.vue
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-01-25 15:26:16 +0100
committerVincent Petry <vincent@nextcloud.com>2021-04-15 10:02:00 +0200
commit8680bafc5c791153488dd32108f4a7d0969edb8c (patch)
treea5479cf174400bd1ba9f51423357b3517c308cb2 /apps/files_sharing/src/components/SharingEntry.vue
parent8ef920fdf90bc54d6f17134ebd80a71db2f9d8ea (diff)
downloadnextcloud-server-8680bafc5c791153488dd32108f4a7d0969edb8c.tar.gz
nextcloud-server-8680bafc5c791153488dd32108f4a7d0969edb8c.zip
Implement expiration date for federated shares
Add expiration date field in UI. Save expiration date when creating or updating federated share. Read expiration date from DB in federated share provider. Applies to both federated user and group shares. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/src/components/SharingEntry.vue')
-rw-r--r--apps/files_sharing/src/components/SharingEntry.vue18
1 files changed, 4 insertions, 14 deletions
diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue
index d31c7ef6e3f..0e6975d9d57 100644
--- a/apps/files_sharing/src/components/SharingEntry.vue
+++ b/apps/files_sharing/src/components/SharingEntry.vue
@@ -84,16 +84,14 @@
</ActionCheckbox>
<!-- expiration date -->
- <ActionCheckbox
- v-if="canHaveExpirationDate"
- :checked.sync="hasExpirationDate"
+ <ActionCheckbox :checked.sync="hasExpirationDate"
:disabled="config.isDefaultInternalExpireDateEnforced || saving"
@uncheck="onExpirationDisable">
{{ config.isDefaultInternalExpireDateEnforced
? t('files_sharing', 'Expiration date enforced')
: t('files_sharing', 'Set expiration date') }}
</ActionCheckbox>
- <ActionInput v-if="canHaveExpirationDate && hasExpirationDate"
+ <ActionInput v-if="hasExpirationDate"
ref="expireDate"
v-tooltip.auto="{
content: errors.expireDate,
@@ -224,16 +222,8 @@ export default {
},
canHaveNote() {
- return !this.isRemoteShare
- },
-
- 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
+ return this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE
+ && this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
},
/**