aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/components/SharingEntry.vue
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-03-25 17:32:49 +0100
committerVincent Petry <vincent@nextcloud.com>2021-04-15 10:06:09 +0200
commitaf61486aea90cfc1a82301ce624dffb59ed01e07 (patch)
tree9b608272439503e0015ece40ae4b77013eabc81f /apps/files_sharing/src/components/SharingEntry.vue
parent2650da70caa73c8bf3119edebb37e91d67f3a214 (diff)
downloadnextcloud-server-af61486aea90cfc1a82301ce624dffb59ed01e07.tar.gz
nextcloud-server-af61486aea90cfc1a82301ce624dffb59ed01e07.zip
Separate settings for remote share expiration
Added separate settings for default and enforced expiration date for remote 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.vue17
1 files changed, 13 insertions, 4 deletions
diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue
index 0e6975d9d57..e07654a19c1 100644
--- a/apps/files_sharing/src/components/SharingEntry.vue
+++ b/apps/files_sharing/src/components/SharingEntry.vue
@@ -222,8 +222,12 @@ export default {
},
canHaveNote() {
- return this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE
- && this.share.type !== this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
+ return !this.isRemote
+ },
+
+ isRemote() {
+ return this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE
+ || this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
},
/**
@@ -348,8 +352,13 @@ export default {
},
dateMaxEnforced() {
- return this.config.isDefaultInternalExpireDateEnforced
- && moment().add(1 + this.config.defaultInternalExpireDate, 'days')
+ if (!this.isRemote) {
+ return this.config.isDefaultInternalExpireDateEnforced
+ && moment().add(1 + this.config.defaultInternalExpireDate, 'days')
+ } else {
+ return this.config.isDefaultRemoteExpireDateEnforced
+ && moment().add(1 + this.config.defaultRemoteExpireDate, 'days')
+ }
},
/**