Correct check for enabled expiration date

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>
This commit is contained in:
fenn-cs 2023-09-28 12:40:18 +01:00 提交者 nextcloud-command
父節點 a092bae720
當前提交 0537bbd331
共有 97 個檔案被更改,包括 144 行新增152 行删除

查看文件

@ -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

2
dist/3609-3609.js vendored

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

4
dist/50-50.js vendored

檔案差異因為一行或多行太長而無法顯示

2
dist/50-50.js.map vendored

檔案差異因為一行或多行太長而無法顯示

3
dist/520-520.js vendored Normal file

檔案差異因為一行或多行太長而無法顯示

1
dist/520-520.js.map vendored Normal file

檔案差異因為一行或多行太長而無法顯示

3
dist/5329-5329.js vendored

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

2
dist/5912-5912.js vendored Normal file

檔案差異因為一行或多行太長而無法顯示

1
dist/5912-5912.js.map vendored Normal file

檔案差異因為一行或多行太長而無法顯示

2
dist/6678-6678.js vendored Normal file

檔案差異因為一行或多行太長而無法顯示

1
dist/6678-6678.js.map vendored Normal file

檔案差異因為一行或多行太長而無法顯示

2
dist/6870-6870.js vendored

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

4
dist/7816-7816.js vendored

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

4
dist/core-common.js vendored

檔案差異因為一行或多行太長而無法顯示

查看文件

@ -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
*/
/*!

檔案差異因為一行或多行太長而無法顯示

4
dist/core-login.js vendored

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

4
dist/core-main.js vendored

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

4
dist/files-init.js vendored

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

4
dist/files-main.js vendored

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示

檔案差異因為一行或多行太長而無法顯示