feat: Show the current users name in the sidebar (#2821)

Co-authored-by: Oleg Lobanov <oleg@lobanov.me>
Co-authored-by: Henrique Dias <mail@hacdias.com>
This commit is contained in:
Jonathan Bout 2025-07-12 07:59:50 +02:00 committed by GitHub
parent fbe169b84f
commit 528ce92fad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 15 deletions

View file

@ -30,6 +30,7 @@ type userInfo struct {
LockPassword bool `json:"lockPassword"`
HideDotfiles bool `json:"hideDotfiles"`
DateFormat bool `json:"dateFormat"`
Username string `json:"username"`
}
type authToken struct {
@ -198,6 +199,7 @@ func printToken(w http.ResponseWriter, _ *http.Request, d *data, user *users.Use
Commands: user.Commands,
HideDotfiles: user.HideDotfiles,
DateFormat: user.DateFormat,
Username: user.Username,
},
RegisteredClaims: jwt.RegisteredClaims{
IssuedAt: jwt.NewNumericDate(time.Now()),