Skip to content

Commit

Permalink
fix: No password set for new mail shares
Browse files Browse the repository at this point in the history
Before the password is set on a new share, the computed property `hasUnsavedPassword`

is used to check that `this.share.newPassword` is not undefined. Direct assignment without

using Vue's `this.$set` makes it impossible for vue to detect that changes have happened on the share

object. Hence the inreactivity.

This worked initially most likely because `this.share.newPassword = await GeneratePassword()` was executed

before the computed properties where evaluated.

Resolves : #43919

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>

[skip ci]
  • Loading branch information
Fenn-CS authored and backportbot[bot] committed Mar 14, 2024
1 parent 9f0028c commit 34a8f10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_sharing/src/views/SharingDetailsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ export default {
if (this.isNewShare) {
if (this.isPasswordEnforced && this.isPublicShare) {
this.share.newPassword = await GeneratePassword()
this.$set(this.share, 'newPassword', await GeneratePassword())
this.advancedSectionAccordionExpanded = true
}
/* Set default expiration dates if configured */
Expand Down

0 comments on commit 34a8f10

Please sign in to comment.