diff options
author | fenn-cs <fenn25.fn@gmail.com> | 2023-09-20 12:53:54 +0100 |
---|---|---|
committer | fenn-cs <fenn25.fn@gmail.com> | 2023-09-21 08:16:48 +0100 |
commit | 236ee6c57881cb809e35e9c5843ff8b1a7c17be1 (patch) | |
tree | d63767b0b90de9617069f51cb5bf2eaf6cd19437 /apps/files_sharing/src | |
parent | 9dd84be4e65a65d3faf24ad9339c919ecb5f8104 (diff) | |
download | nextcloud-server-236ee6c57881cb809e35e9c5843ff8b1a7c17be1.tar.gz nextcloud-server-236ee6c57881cb809e35e9c5843ff8b1a7c17be1.zip |
Auto set password for new email shares
Suggest auto generated password for new public share (mail share).
Resolves : https://github.com/nextcloud/server/issues/40493
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r-- | apps/files_sharing/src/views/SharingDetailsTab.vue | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index 8300b1cabba..e5703a54253 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -675,11 +675,17 @@ export default { this.revertSharingPermission = !isCustomPermissions ? selectedPermission : 'custom' this.setCustomPermissions = isCustomPermissions }, - initializeAttributes() { + async initializeAttributes() { + let hasAdvancedAttributes = false - if (this.isNewShare) return + if (this.isNewShare) { + if (this.isPasswordEnforced && this.isPublicShare) { + this.share.newPassword = await GeneratePassword() + this.advancedSectionAccordionExpanded = true + } + return + } - let hasAdvancedAttributes = false if (this.isValidShareAttribute(this.share.note)) { this.writeNoteToRecipientIsChecked = true hasAdvancedAttributes = true |