Browse Source

Admins only get passwords.

hkremer/rebranding
Gregory Rudolph 4 years ago
parent
commit
d1122bab29
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 8
      auth.go

8
auth.go

@ -24,8 +24,12 @@ func reqPass(w http.ResponseWriter, r *http.Request) {
if err == nil { if err == nil {
for _, m := range g { for _, m := range g {
if strings.ToUpper(m.Nick) == strings.ToUpper(username) { if strings.ToUpper(m.Nick) == strings.ToUpper(username) {
userID = m.User.ID for _, r := range m.Roles {
log.LogInfo("User ID found for %+v as %+v", username, userID) if r == config.AdminRole {
userID = m.User.ID
log.LogInfo("User ID found for %+v as %+v", username, userID)
}
}
} }
} }
} else { } else {

Loading…
Cancel
Save