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

@ -125,9 +125,9 @@ verified players perks. It keeps everything in SimpleAdmin's database (`gv_verif
it to the ranks that should have it in the rank editor), staff give overrides for a day up to a it to the ranks that should have it in the rank editor), staff give overrides for a day up to a
year or with no expiry, change them and remove them. Root sets the group and turns verification year or with no expiry, change them and remove them. Root sets the group and turns verification
on and off. on and off.
- **Everyone** sees a "Verified" tag on the scoreboard and on player pages, but only while - **The public site** shows nothing about verification. On the staff panel, the Overview
verification is on (enabled, with a group set) and GroupVerify isn't missing from the server's scoreboard shows a "Verified" tag only while verification is on (enabled, with a group set) and
plugin list. The public site never shows why someone is verified, or who gave an override. GroupVerify isn't missing from the server's plugin list.
- **Clan tag**: Root can set the scoreboard tag verified players without a rank get (GroupVerify's - **Clan tag**: Root can set the scoreboard tag verified players without a rank get (GroupVerify's
`clan_tag`, at most 12 characters). CS2-Tags (1.0.4c-zio6+) applies it, and gives unverified `clan_tag`, at most 12 characters). CS2-Tags (1.0.4c-zio6+) applies it, and gives unverified
players without a rank no tag at all. Blank turns it off. players without a rank no tag at all. Blank turns it off.

View file

@ -42,7 +42,7 @@ async function server() {
<thead><tr><th>Player</th><th class="num">Kills</th><th class="num">Deaths</th><th class="num hide-sm">Ping</th></tr></thead> <thead><tr><th>Player</th><th class="num">Kills</th><th class="num">Deaths</th><th class="num hide-sm">Ping</th></tr></thead>
<tbody> <tbody>
${list.map((p) => `<tr ${p.bot ? "" : `class="clickable" data-player="${esc(p.steamid)}"`}> ${list.map((p) => `<tr ${p.bot ? "" : `class="clickable" data-player="${esc(p.steamid)}"`}>
<td><div class="who"><div><b>${esc(p.name)}</b>${p.verified ? ` ${VERIFIED_TAG}` : ""}${p.bot ? '<span class="sid">Bot</span>' : p.rank ? rankTag(p.rank) : ""}</div></div></td> <td><div class="who"><div><b>${esc(p.name)}</b>${p.bot ? '<span class="sid">Bot</span>' : p.rank ? rankTag(p.rank) : ""}</div></div></td>
<td class="num">${p.kills}</td> <td class="num">${p.kills}</td>
<td class="num">${p.deaths}</td> <td class="num">${p.deaths}</td>
<td class="num hide-sm muted">${p.bot ? "" : p.ping}</td> <td class="num hide-sm muted">${p.bot ? "" : p.ping}</td>
@ -243,8 +243,8 @@ async function openPlayer(sid) {
<div><h2>${esc(name)}</h2><span class="sid">${esc(p.steamid)} · <a href="${steamProfile(p.steamid)}" target="_blank" rel="noopener">Steam profile</a></span>${p.rank ? `<div>${rankTag(p.rank)}</div>` : ""}</div> <div><h2>${esc(name)}</h2><span class="sid">${esc(p.steamid)} · <a href="${steamProfile(p.steamid)}" target="_blank" rel="noopener">Steam profile</a></span>${p.rank ? `<div>${rankTag(p.rank)}</div>` : ""}</div>
<button class="close" type="button" data-close aria-label="Close">×</button> <button class="close" type="button" data-close aria-label="Close">×</button>
</div> </div>
${now.length || p.online || p.verified ? `<section> ${now.length || p.online ? `<section>
<div class="chips">${p.verified ? VERIFIED_TAG : ""}${p.online ? '<span class="tag">On the server</span>' : ""}${now.map((h) => `<span class="tag ${h.kind === "ban" ? "red" : "amber"}">${h.kind === "ban" ? "Banned" : COMM_HELP[h.type]}${h.duration ? `, ${fmtLeft(served(h).left)}` : ", permanently"}</span>`).join("")}</div> <div class="chips">${p.online ? '<span class="tag">On the server</span>' : ""}${now.map((h) => `<span class="tag ${h.kind === "ban" ? "red" : "amber"}">${h.kind === "ban" ? "Banned" : COMM_HELP[h.type]}${h.duration ? `, ${fmtLeft(served(h).left)}` : ", permanently"}</span>`).join("")}</div>
</section>` : ""} </section>` : ""}
${ptDrawer(p.playtime, p.online)} ${ptDrawer(p.playtime, p.online)}
<section> <section>

View file

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