Fixed Change Password Bug

This commit is contained in:
Chris Mann 2023-07-25 15:18:20 +02:00
parent 25035d684d
commit 84c46149f6

View file

@ -26,11 +26,16 @@ func handleHome(w http.ResponseWriter, r *http.Request) {
login = checkLogin(w, r) login = checkLogin(w, r)
} }
can_admin := false
if login != nil {
can_admin = login.CanAdmin
}
data := HomePageData{ data := HomePageData{
Login: login, Login: login,
BaseDN: config.BaseDN, BaseDN: config.BaseDN,
Org: config.Org, Org: config.Org,
CanAdmin: login.CanAdmin, CanAdmin: can_admin,
LoggedIn: true, LoggedIn: true,
} }
templateHome.Execute(w, data) templateHome.Execute(w, data)