diff --git a/packages/web-app-files/src/components/SideBar/Shares/FileLinks.vue b/packages/web-app-files/src/components/SideBar/Shares/FileLinks.vue
index d3a9dd05edc..7602fc4f36b 100644
--- a/packages/web-app-files/src/components/SideBar/Shares/FileLinks.vue
+++ b/packages/web-app-files/src/components/SideBar/Shares/FileLinks.vue
@@ -14,14 +14,14 @@
getExpirationRules({ store, currentLanguage }))
+
return {
$store: store,
ability,
@@ -241,7 +246,8 @@ export default defineComponent({
configurationManager,
passwordPolicyService,
canCreateLinks,
- canEditLink
+ canEditLink,
+ expirationRules
}
},
computed: {
@@ -264,36 +270,6 @@ export default defineComponent({
return this.outgoingLinks.find((link) => link.quicklink === true && !link.indirect)
},
- expirationDate() {
- const expireDate = this.capabilities.files_sharing.public.expire_date
-
- let defaultExpireDate = null
- let maxExpireDateFromCaps = null
-
- if (expireDate.days) {
- const days = parseInt(expireDate.days)
- defaultExpireDate = DateTime.now()
- .setLocale(getLocaleFromLanguage(this.$language.current))
- .plus({ days })
- .toJSDate()
- }
-
- if (expireDate.enforced) {
- const days = parseInt(expireDate.days)
- maxExpireDateFromCaps = DateTime.now()
- .setLocale(getLocaleFromLanguage(this.$language.current))
- .plus({ days })
- .toJSDate()
- }
-
- return {
- enforced: expireDate.enforced,
- default: defaultExpireDate,
- min: DateTime.now().setLocale(getLocaleFromLanguage(this.$language.current)).toJSDate(),
- max: maxExpireDateFromCaps
- }
- },
-
helpersEnabled() {
return this.configuration?.options?.contextHelpers
},
@@ -415,7 +391,7 @@ export default defineComponent({
ability: this.ability,
store: this.$store
}).toString(),
- expiration: this.expirationDate.default,
+ expiration: this.expirationRules.default,
password: false
}
})
diff --git a/packages/web-app-files/src/components/SideBar/Shares/Links/CreateQuickLink.vue b/packages/web-app-files/src/components/SideBar/Shares/Links/CreateQuickLink.vue
index 133fc766b2e..b045510bbed 100644
--- a/packages/web-app-files/src/components/SideBar/Shares/Links/CreateQuickLink.vue
+++ b/packages/web-app-files/src/components/SideBar/Shares/Links/CreateQuickLink.vue
@@ -26,16 +26,20 @@