web user templates: ensure we can save valid users

users with no public key and password are now valid after the recent
changes

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-04-01 09:47:54 +02:00
parent 55f8171dd1
commit 3521bacc4a
2 changed files with 7 additions and 7 deletions

View File

@@ -705,7 +705,7 @@ func getUsersForTemplate(r *http.Request) []userTemplateFields {
if len(tplPublicKeys) > idx {
publicKey = strings.TrimSpace(tplPublicKeys[idx])
}
if username == "" || (password == "" && publicKey == "") {
if username == "" {
continue
}
if _, ok := users[username]; ok {