fix: No password set for new mail shares

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 : https://github.com/nextcloud/server/issues/43919

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
This commit is contained in:
fenn-cs 2024-03-14 00:43:10 +01:00 committed by Ferdinand Thiessen
parent cdbea2f178
commit 56064697c8
No known key found for this signature in database
GPG key ID: 45FAE7268762B400

View file

@ -683,7 +683,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 */