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