Refactoring

This commit is contained in:
Chris Mann 2023-07-26 08:48:56 +02:00
parent 5120dbef28
commit e5358c20d8
2 changed files with 3 additions and 3 deletions

View file

@ -56,7 +56,7 @@ func checkLogin(w http.ResponseWriter, r *http.Request) *LoginStatus {
return nil return nil
} }
userEntry := ldapUser.UserEntry userEntry := ldapUser.UserEntry
loginStatus := &LoginStatus{ loginStatus := LoginStatus{
Info: login_info, Info: login_info,
conn: l, conn: l,
UserEntry: userEntry, UserEntry: userEntry,
@ -65,7 +65,7 @@ func checkLogin(w http.ResponseWriter, r *http.Request) *LoginStatus {
CanInvite: ldapUser.CanInvite, CanInvite: ldapUser.CanInvite,
}, },
} }
return loginStatus return &loginStatus
} else { } else {
return nil return nil
} }

View file

@ -19,7 +19,7 @@ func handleProfile(w http.ResponseWriter, r *http.Request) {
templatePasswd.Execute(w, PasswdTplData{ templatePasswd.Execute(w, PasswdTplData{
Common: NestedCommonTplData{ Common: NestedCommonTplData{
CanAdmin: login.Common.CanAdmin, CanAdmin: login.CanAdmin,
LoggedIn: true}, LoggedIn: true},
}) })
return return