The default expiration date cannot be enforced if it is not enabled in the first place. Hence, the check for whether a share has an expiration date should not consider enforcements but only where the share expiry type is enabled. For example : Using `this.config.isDefaultExpireDateEnabled` instead of `this.config.isDefaultExpireDateEnforced` which can be verified by checking `isExpiryDateEnforced`. Resolves : https://github.com/nextcloud/server/issues/40612 Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>tags/v28.0.0beta1
@@ -380,13 +380,19 @@ export default { | |||
*/ | |||
hasExpirationDate: { | |||
get() { | |||
const isDefaultExpireDateEnabled = this.config.isDefaultExpireDateEnabled | |||
const hasExistingExpirationDate = !!this.share.expireDate || isDefaultExpireDateEnabled | |||
const isDefaultInternalExpireDateEnabled = this.config.isDefaultInternalExpireDateEnabled | |||
const isDefaultRemoteExpireDateEnabled = this.config.isDefaultRemoteExpireDateEnabled | |||
if (this.isPublicShare) { | |||
return !!this.share.expireDate || this.config.isDefaultExpireDateEnforced | |||
return hasExistingExpirationDate | |||
} | |||
if (this.isRemoteShare) { | |||
return !!this.share.expireDate || this.config.isDefaultInternalExpireDateEnforced || this.config.isDefaultExpireDateEnforced | |||
return hasExistingExpirationDate || isDefaultRemoteExpireDateEnabled | |||
} | |||
return !!this.share.expireDate || this.config.isDefaultInternalExpireDateEnforced || this.config.isDefaultExpireDateEnforced | |||
return hasExistingExpirationDate || isDefaultInternalExpireDateEnabled | |||
}, | |||
set(enabled) { | |||
this.share.expireDate = enabled |
@@ -5,17 +5,6 @@ | |||
* @license MIT | |||
*/ | |||
/*! | |||
* Sizzle CSS Selector Engine v2.3.10 | |||
* https://sizzlejs.com/ | |||
* | |||
* Copyright JS Foundation and other contributors | |||
* Released under the MIT license | |||
* https://js.foundation/ | |||
* | |||
* Date: 2023-02-14 | |||
*/ | |||
/*! | |||
* The buffer module from node.js, for the browser. | |||
* | |||
@@ -53,17 +42,14 @@ | |||
*/ | |||
/*! | |||
* jQuery JavaScript Library v3.6.4 | |||
* jQuery JavaScript Library v3.7.1 | |||
* https://jquery.com/ | |||
* | |||
* Includes Sizzle.js | |||
* https://sizzlejs.com/ | |||
* | |||
* Copyright OpenJS Foundation and other contributors | |||
* Released under the MIT license | |||
* https://jquery.org/license | |||
* | |||
* Date: 2023-03-08T15:28Z | |||
* Date: 2023-08-28T13:37Z | |||
*/ | |||
/*! |