No Verified tags on the public site

The public scoreboard and player pages no longer show or receive whether
a player is verified. The staff panel still does.
This commit is contained in:
Astra 2026-10-04 22:16:42 +01:00
parent 7004945d49
commit f659859d66
3 changed files with 11 additions and 13 deletions

View file

@ -38,7 +38,7 @@ func toPublic(ps []store.Penalty) []publicPenalty {
type livePlayer struct {
live.Player
Rank *rankView `json:"rank,omitempty"`
// Verified by GroupVerify, when that's shown at all (see verifyInfo.Shown).
// Verified by GroupVerify, when that's shown at all (see verifyInfo.Shown). Staff overview only.
Verified bool `json:"verified,omitempty"`
// Staff-only fields, left empty on the public page.
Tags []string `json:"tags,omitempty"`
@ -84,9 +84,8 @@ func (s *Server) publicServer(w http.ResponseWriter, r *http.Request) {
internal(w, r, err)
return
}
view := s.serverView(x, s.poll.Current())
s.markVerified(r.Context(), view.Players)
writeJSON(w, http.StatusOK, view)
// No Verified tags on the public scoreboard; the staff overview still marks them.
writeJSON(w, http.StatusOK, s.serverView(x, s.poll.Current()))
}
// penaltyQuery reads ?status=&q=&page= (and for comms, a type in place of the status).
@ -290,11 +289,10 @@ func (s *Server) publicPlayer(w http.ResponseWriter, r *http.Request) {
return
}
_, online := s.poll.Current().Find(steamid)
// Only whether they're verified: why, and overrides' expiry and who gave them, are for staff.
st, verified := s.verifiedSet(r.Context(), []string{steamid})[steamid]
// No verification on the public site: that's on the staff panel.
resp := map[string]any{
"steamid": steamid, "name": d.Name, "online": online, "rank": s.rankOf(x, steamid),
"verified": verified && st.Verified(), "bans": toPublic(bans), "comms": toPublic(comms),
"bans": toPublic(bans), "comms": toPublic(comms),
}
// Signed-in staff get the staff playtime figures here too, as on the staff panel.
id, _, err := s.identity(r)