feat(enclave): banned-list UI with per-user unban (LC-340) #356
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-340-enclave-banlist"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds a manager-gated "Banned users" section to enclave settings so an enclave's bans (written by LC-339 Coyote Mode, and any future manual enclave ban) are visible and reversible. Before this, lifting a ban meant a hand DB edit, so a Coyote false positive was effectively permanent.
db::enclave::list_enclave_bans+unban_from_enclave;POST /enclave/{id}/bans/{user_id}/unban(require_manage, redirects to settings).enclave-settings-bans-*).Unbanning removes the
enclave_bansrow. Because the ban had also removed membership, the user rejoins (invite code / discover) to regain access, then can post again.Test
db_coyote_mode.rs:list_and_unban_round_trip(list newest-first with reason; unban removes one, leaves the other; no-op on a non-banned user).routes_coyote_mode.rs:member_cannot_unban(non-manager 403, ban unchanged);manager_unban_then_member_can_rejoin_and_post(banned -> rejoin 403; manager unban -> SEE_OTHER + is_enclave_banned false; member rejoins then posts 204).just check(clippy std+saas+desktop, fmt),just test,just test-saasall pass. en/es parity holds. No new migration (reuses LC-339'senclave_bans).Closes LC-340.
LC-339 added the enclave_bans ban-list (written by Coyote Mode) and enforced it on join/post, but there was no UI to view or lift a ban - an operator had to edit the DB, so a Coyote false positive was effectively permanent. Adds a manager-gated "Banned users" section to enclave settings listing each banned user (resolved label + reason + banned-at) with an Unban button, backed by db::enclave::list_enclave_bans + unban_from_enclave and POST /enclave/{id}/bans/{user_id}/unban. Unbanning removes the row; the user can then rejoin (invite code / discover) and post again (the ban had also removed membership, so a rejoin is required to regain access). #LC-340 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>