Skip to content

Commit

Permalink
Merge pull request #50820 from nextcloud/fix/public-share-expiration
Browse files Browse the repository at this point in the history
fix(files_sharing): Fix public share expiration being set when toggle is not enabled
  • Loading branch information
Pytal authored Feb 18, 2025
2 parents 082e85f + 77edb25 commit 8c223b6
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 9 deletions.
9 changes: 7 additions & 2 deletions apps/files_sharing/src/components/SharingEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
:checked.sync="defaultExpirationDateEnabled"
:disabled="pendingEnforcedExpirationDate || saving"
class="share-link-expiration-date-checkbox"
@change="onExpirationDateToggleChange">
@update:model-value="onExpirationDateToggleUpdate">
{{ config.isDefaultExpireDateEnforced ? t('files_sharing', 'Enable link expiration (enforced)') : t('files_sharing', 'Enable link expiration') }}
</NcActionCheckbox>

Expand Down Expand Up @@ -875,9 +875,14 @@ export default {
this.onPasswordSubmit()
this.onNoteSubmit()
},
onExpirationDateToggleChange(enabled) {

/**
* @param enabled True if expiration is enabled
*/
onExpirationDateToggleUpdate(enabled) {
this.share.expireDate = enabled ? this.formatDateToString(this.config.defaultExpirationDate) : ''
},

expirationDateChanged(event) {
const date = event.target.value
this.onExpirationChange(date)
Expand Down
1 change: 0 additions & 1 deletion dist/1031-1031.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/1031-1031.js.map.license

This file was deleted.

4 changes: 2 additions & 2 deletions dist/1031-1031.js → dist/9699-9699.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/9699-9699.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/9699-9699.js.map.license
4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

0 comments on commit 8c223b6

Please sign in to comment.