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:
parent
b2b4698776
commit
9e4bc63201
15 changed files with 1270 additions and 13 deletions
|
|
@ -41,6 +41,7 @@ type Server struct {
|
|||
poll *live.Poller
|
||||
sacfg *saconfig.File // nil when no config path is set
|
||||
staff *staffCache
|
||||
verify *verifyCache
|
||||
avatars *avatarCache
|
||||
http *http.Client
|
||||
secure bool
|
||||
|
|
@ -63,6 +64,7 @@ func New(cfg Config, st *store.Store, rc *rcon.Client, poll *live.Poller, sacfg
|
|||
poll: poll,
|
||||
sacfg: sacfg,
|
||||
staff: &staffCache{st: st, ttl: 15 * time.Second},
|
||||
verify: &verifyCache{st: st, ttl: 30 * time.Second},
|
||||
avatars: newAvatarCache(&http.Client{Timeout: 10 * time.Second}),
|
||||
http: &http.Client{Timeout: 10 * time.Second},
|
||||
secure: u.Scheme == "https",
|
||||
|
|
@ -101,6 +103,7 @@ func (s *Server) Handler() http.Handler {
|
|||
admin("GET /api/admin/comms", s.adminComms)
|
||||
admin("GET /api/admin/staff", s.adminStaff)
|
||||
admin("GET /api/admin/settings", s.adminSettings)
|
||||
admin("GET /api/admin/verify", s.adminVerify)
|
||||
|
||||
admin("POST /api/admin/penalties", s.addPenalty)
|
||||
admin("POST /api/admin/penalties/lift", s.liftPenalty)
|
||||
|
|
@ -117,6 +120,9 @@ func (s *Server) Handler() http.Handler {
|
|||
admin("DELETE /api/admin/staff/{steamid}", s.removeStaff)
|
||||
admin("POST /api/admin/settings/cvars", s.saveCvars)
|
||||
admin("POST /api/admin/settings/simpleadmin", s.saveSimpleAdmin)
|
||||
admin("POST /api/admin/verify/overrides", s.setOverride)
|
||||
admin("DELETE /api/admin/verify/overrides/{steamid}", s.removeOverride)
|
||||
admin("POST /api/admin/verify/settings", s.saveVerifySettings)
|
||||
|
||||
return s.headers(mux)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue