From 34a8f10fbda20c1a1c594bec5805daf590750627 Mon Sep 17 00:00:00 2001 From: fenn-cs Date: Thu, 14 Mar 2024 00:43:10 +0100 Subject: [PATCH] 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 [skip ci] --- apps/files_sharing/src/views/SharingDetailsTab.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index 5214582153c8e..67680351c92e8 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -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 */