Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

POST /admin/lift lifts a live mute or ban for the owner or a moderator, same-origin, and logs who did it - route and test only #356

shipped merged opened this has it
opened this

Split from #221, which was parked after its preview deploy failed (pull #320). This is the server half only: no page markup changes.

Done:

  • [ ] Software/so101/src/admin-routes.ts answers POST /admin/lift with a form body kind=mute|ban and id=<user id>. It checks the same origin and the session (owner, or a moderator who may not lift a mute or ban on the owner or another moderator, the same rule as /live), lifts it through the existing Chat.unmute or accounts unban, and records unmuted <name> or unbanned <name> in the admin log with who did it. Then it redirects 303 to /admin.
  • [ ] A bad kind or id is a 400, and lifting something that is not in force is a 404.
  • [ ] Tests: a moderator's unban works and appears in the log, a plain user's POST is 403, a cross-origin POST is 403, and a bad kind is 400.
  • [ ] Only admin-routes.ts and its test change. forge.json is untouched, and bun --cwd Software/so101 test passes.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs