diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index 896ca1bbc95ec..9218d7afe2ec1 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -97,13 +97,13 @@ @@ -302,12 +302,6 @@ export default { } return null }, - dateMaxEnforced() { - if (this.config.isDefaultExpireDateEnforced) { - return new Date(new Date().setDate(new Date().getDate() + this.config.defaultExpireDate)) - } - return null - }, /** * Is the current share password protected ? * diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js index 860d1716fe0a6..41bdf302f7a8c 100644 --- a/apps/files_sharing/src/mixins/SharesMixin.js +++ b/apps/files_sharing/src/mixins/SharesMixin.js @@ -132,6 +132,9 @@ export default { const shareType = this.share.shareType ?? this.share.type return [this.SHARE_TYPES.SHARE_TYPE_LINK, this.SHARE_TYPES.SHARE_TYPE_EMAIL].includes(shareType) }, + isRemoteShare() { + return this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP || this.share.type === this.SHARE_TYPES.SHARE_TYPE_REMOTE + }, isShareOwner() { return this.share && this.share.owner === getCurrentUser().uid }, @@ -152,6 +155,19 @@ export default { ] return !bundledPermissions.includes(this.share.permissions) }, + maxExpirationDateEnforced() { + if (this.isExpiryDateEnforced) { + if (this.isPublicShare) { + return this.config.defaultExpirationDate + } + if (this.isRemoteShare) { + return this.config.defaultRemoteExpirationDateString + } + // If it get's here then it must be an internal share + return this.config.defaultInternalExpirationDate + } + return null + }, }, methods: { diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index a398829dbb0c8..580d24eae5895 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -15,169 +15,179 @@

{{ title }}

-
-
- - - {{ t('files_sharing', 'View only') }} - - - - -