From 40226c7393b670a13d2c96aaca7f90cb35196112 Mon Sep 17 00:00:00 2001 From: Lorian Coltof Date: Thu, 8 Sep 2022 15:19:53 +0200 Subject: [PATCH] Implement setting private key password when creating user --- frontend/src/main.js | 3 +++ frontend/static/index.html | 1 + main.go | 42 ++++++++++++++++++++++++++++++-------- 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/frontend/src/main.js b/frontend/src/main.js index 6f3088b..8e0709f 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -189,6 +189,7 @@ new Vue({ u: { newUserName: '', newUserPassword: '', + newUserPrivateKeyPassword: '', newUserCreateError: '', newPassword: '', passwordChangeStatus: '', @@ -393,6 +394,7 @@ new Vue({ var data = new URLSearchParams(); data.append('username', _this.u.newUserName); data.append('password', _this.u.newUserPassword); + data.append('private-key-password', _this.u.newUserPrivateKeyPassword); _this.username = _this.u.newUserName; @@ -402,6 +404,7 @@ new Vue({ _this.u.modalNewUserVisible = false; _this.u.newUserName = ''; _this.u.newUserPassword = ''; + _this.u.newUserPrivateKeyPassword = ''; _this.getUserData(); }) .catch(function(error) { diff --git a/frontend/static/index.html b/frontend/static/index.html index 1a65bb7..227a9c4 100644 --- a/frontend/static/index.html +++ b/frontend/static/index.html @@ -51,6 +51,7 @@