Fixed Change Password Bug

This commit is contained in:
Chris Mann 2023-07-25 14:31:00 +02:00
parent 401bd0dac1
commit 73f0b98adc

21
home.go
View file

@ -15,20 +15,19 @@ type HomePageData struct {
} }
func handleHome(w http.ResponseWriter, r *http.Request) { func handleHome(w http.ResponseWriter, r *http.Request) {
templateHome := getTemplate("home.html")
login := checkLogin(w, r) login := checkLogin(w, r)
if login == nil { if login == nil {
return return
} else {
templateHome := getTemplate("home.html")
data := &HomePageData{
Login: login,
BaseDN: config.BaseDN,
Org: config.Org,
CanAdmin: login.CanAdmin,
LoggedIn: true,
}
templateHome.Execute(w, data)
} }
data := &HomePageData{
Login: login,
BaseDN: config.BaseDN,
Org: config.Org,
CanAdmin: login.CanAdmin,
LoggedIn: true,
}
templateHome.Execute(w, data)
} }