Add display names for app users

This commit is contained in:
DonVoo 2026-07-13 00:56:38 +02:00
parent 6e7aa87de6
commit b625c95c29
3 changed files with 92 additions and 35 deletions

View file

@ -50,7 +50,7 @@ func InitAuth() error {
if err != nil {
return err
}
return SaveAppUser(strings.TrimSpace(Cfg.AdminUser), hash, roleAdmin, true)
return SaveAppUser(strings.TrimSpace(Cfg.AdminUser), "Admin", hash, roleAdmin, true)
}
// AuthMiddleware schuetzt alle Routen ausser /login und /static.
@ -169,7 +169,7 @@ func renderLoginPage(w http.ResponseWriter, errMsg string) {
fmt.Fprintf(w, `<!doctype html><html lang="de"><head><meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Login - Mail-Graveyard</title>
<link rel="stylesheet" href="/static/style.css?v=20260712-16"></head>
<link rel="stylesheet" href="/static/style.css?v=20260712-17"></head>
<body class="ol2013 login-body">
<main class="login-card">
<div class="login-brand"><span class="mail-logo" aria-hidden="true"></span><strong>Mail-Graveyard</strong></div>