diff options
Diffstat (limited to 'src/helsinki.at/rhimportd/ctrlWebSimple.go')
-rw-r--r-- | src/helsinki.at/rhimportd/ctrlWebSimple.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/helsinki.at/rhimportd/ctrlWebSimple.go b/src/helsinki.at/rhimportd/ctrlWebSimple.go index 9a408ed..61daf0a 100644 --- a/src/helsinki.at/rhimportd/ctrlWebSimple.go +++ b/src/helsinki.at/rhimportd/ctrlWebSimple.go @@ -99,12 +99,13 @@ func webSimpleParseRequest(conf *rhimport.Config, rddb *rhimport.RdDbChan, trust return } - username := reqdata.UserName + ctx = rhimport.NewContext(conf, rddb) if trusted { - username = r.Header.Get("X-Forwarded-User") + ctx.UserName = r.Header.Get("X-Forwarded-User") + } else { + ctx.UserName = reqdata.UserName + ctx.Password = reqdata.Password } - ctx = rhimport.NewContext(conf, rddb, username) - ctx.Password = reqdata.Password ctx.Trusted = trusted ctx.ShowId = reqdata.ShowId ctx.ClearShowCarts = reqdata.ClearShowCarts |