From bbc12c41a6bb24a6572884f4fbf766aab719ffb6 Mon Sep 17 00:00:00 2001 From: fenn-cs Date: Mon, 16 Oct 2023 15:24:48 +0100 Subject: [PATCH] Check expiry enforcement for all share types We should check that a maximum expiry date has been enforced for all shares and NOT JUST FOR internal shares before enforcing a UI max date, like in commit 9757e680e2f643fe19432255c4142e96fbc88df5 Signed-off-by: fenn-cs --- .../files_sharing/src/views/SharingDetailsTab.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index 6fc1c6d89ea0f..47406c5c0e902 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -430,15 +430,16 @@ export default { return this.fileInfo.type === 'dir' }, maxExpirationDateEnforced() { - 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 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 },