mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
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:
parent
fe9258a7c5
commit
5f4c56e97c
7 changed files with 18 additions and 12 deletions
|
|
@ -368,13 +368,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
|
||||
|
|
|
|||
4
dist/core-common.js
vendored
4
dist/core-common.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-common.js.map
vendored
2
dist/core-common.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_sharing-files_sharing_tab.js
vendored
4
dist/files_sharing-files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing_tab.js.map
vendored
2
dist/files_sharing-files_sharing_tab.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue