GroupVerify: Verification page, overrides and public Verified tags

Shown only where GroupVerify is: staff get the Verification page once its gv_* tables are in
the database, and the public site shows "Verified" only while it's on (enabled, with a group)
and not missing from css_plugins list, which the poller reads once a minute over RCON.

- Verification page: plugin state and version, Steam group, saved member list, overrides.
- Overrides (@zio/verify, not on yourself unless Root): give, change, remove; player drawer
  shows why a player is or isn't verified.
- Root sets the group and turns it on/off: saved to gv_settings, and sent as css_gv_* when the
  plugin is loaded so it applies at once.
- gv_* times use GroupVerify's own timezone setting.
- MySQL integration test (SAW_TEST_DSN), unit tests for plugin list parsing and the show rule.
This commit is contained in:
Astra 2026-10-02 17:59:26 +01:00
parent b2b4698776
commit 9e4bc63201
15 changed files with 1270 additions and 13 deletions

View file

@ -36,3 +36,27 @@ func TestParseErrors(t *testing.T) {
t.Fatal("output without end marker should be an error")
}
}
func TestParsePlugins(t *testing.T) {
out := ` List of all plugins currently loaded by CounterStrikeSharp: 3 plugins loaded.
[#1:LOADED]: "CS2-SimpleAdmin (RELEASE)" (1.8.2b-zio10) by daffyy
Simple admin plugin
[#2:LOADED]: "GroupVerify" (0.2.0) by astra
Verifies players by Steam group membership or a manual override
[#3:UNLOADED]: "NoGoZones" (0.14.0) by astra
Termination Reason: whatever
`
loaded, ok := ParsePlugins(out)
if !ok {
t.Fatal("not recognised as a plugin list")
}
if loaded["GroupVerify"] != "0.2.0" || loaded["CS2-SimpleAdmin (RELEASE)"] != "1.8.2b-zio10" {
t.Fatalf("loaded %v", loaded)
}
if _, ok := loaded["NoGoZones"]; ok {
t.Fatal("unloaded plugins must not count as loaded")
}
if _, ok := ParsePlugins("Unknown command \"css_plugins\"\n"); ok {
t.Fatal("an error reply isn't a plugin list")
}
}