Skip to content

Commit 0537bbd

Browse files
nfebenextcloud-command
authored andcommitted
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 : #40612 Signed-off-by: fenn-cs <[email protected]> Signed-off-by: nextcloud-command <[email protected]>
1 parent a092bae commit 0537bbd

File tree

97 files changed

+144
-152
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+144
-152
lines changed

apps/files_sharing/src/views/SharingDetailsTab.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,13 +380,19 @@ export default {
380380
*/
381381
hasExpirationDate: {
382382
get() {
383+
const isDefaultExpireDateEnabled = this.config.isDefaultExpireDateEnabled
384+
const hasExistingExpirationDate = !!this.share.expireDate || isDefaultExpireDateEnabled
385+
const isDefaultInternalExpireDateEnabled = this.config.isDefaultInternalExpireDateEnabled
386+
const isDefaultRemoteExpireDateEnabled = this.config.isDefaultRemoteExpireDateEnabled
383387
if (this.isPublicShare) {
384-
return !!this.share.expireDate || this.config.isDefaultExpireDateEnforced
388+
return hasExistingExpirationDate
385389
}
390+
386391
if (this.isRemoteShare) {
387-
return !!this.share.expireDate || this.config.isDefaultInternalExpireDateEnforced || this.config.isDefaultExpireDateEnforced
392+
return hasExistingExpirationDate || isDefaultRemoteExpireDateEnabled
388393
}
389-
return !!this.share.expireDate || this.config.isDefaultInternalExpireDateEnforced || this.config.isDefaultExpireDateEnforced
394+
395+
return hasExistingExpirationDate || isDefaultInternalExpireDateEnabled
390396
},
391397
set(enabled) {
392398
this.share.expireDate = enabled

dist/3609-3609.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/3609-3609.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/50-50.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/50-50.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/520-520.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/520-520.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/5329-5329.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

dist/5329-5329.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)