[www] dev/mod sandbox support

This commit is contained in:
Devin Zuczek
2026-10-10 16:27:35 -04:00
parent dd687f02d7
commit 585cf68637
4 changed files with 190 additions and 0 deletions
+7
View File
@@ -58,7 +58,9 @@ import {
requireDeveloper,
requireStaff,
runDiscordRoleGiftHandler,
sandboxStatusHandler,
searchReportsHandler,
setSandboxHandler,
syncDiscordRolesHandler,
topReportedHandler,
} from './staff'
@@ -583,6 +585,11 @@ const app = new Hono<App>()
.post('/api/staff/players/:id/grant-plus', requireDeveloper, grantPlusHandler)
.post('/api/staff/players/:id/username-changes', addUsernameChangeHandler)
.post('/api/staff/players/:id/clear-password', clearPasswordHandler)
// The signed-in staff member's OWN sandbox flag: read it, and opt in or out. Self-only,
// so plain staff (not developer-only) — it moves nobody but the caller, and `match`
// honours it on their next room join.
.get('/api/staff/sandbox', sandboxStatusHandler)
.put('/api/staff/sandbox', setSandboxHandler)
// RecFlare Studio upload access. The same staff gate as moderation: a moderator
// decides who can upload, and the role lands on the player's next token.
.get('/api/staff/studio-access', listStudioAccessHandler)