Fix no username issues

This commit is contained in:
Bolke de Bruin 2024-03-16 11:32:02 +01:00
parent 8e117ad083
commit a67962b02d
2 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ type ClientConfig struct {
// kept for backwards compatibility
UsernameTemplate string `koanf:"usernametemplate"`
SplitUserDomain bool `koanf:"splituserdomain"`
NoUsername string `koanf:"nousername"`
NoUsername bool `koanf:"nousername"`
}
func ToCamel(s string) string {

View File

@ -37,7 +37,7 @@ type Config struct {
type RdpOpts struct {
UsernameTemplate string
SplitUserDomain bool
NoUsername bool
NoUsername bool
}
type Handler struct {
@ -211,7 +211,7 @@ func (h *Handler) HandleDownload(w http.ResponseWriter, r *http.Request) {
}
}
if !NoUsername {
if !h.rdpOpts.NoUsername {
d.Settings.Username = render
if domain != "" {
d.Settings.Domain = domain