feat(admin): add reactivation affordance + endpoint for suspended users #157
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/BUNYIP-120-admin-user-reactivate"
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?
Admin user suspension was one-way: suspended (soft-deleted) accounts vanished from the admin list and detail page (both filter
deleted_at IS NULL), so there was no Reactivate button and no reachable path to setactive=true, even though the bunyip-api status endpoint already handled the reactivate direction (the stale bunyip-web comment claiming the backend rejects active=true and needs a new endpoint was wrong).UserRepository::list_paginatedgains anactive: Option<bool>selector: the default (None/Some(true)) still lists live accounts,Some(false)lists soft-deleted ones. The admin list handler forwards a newactivequery param so the bunyip-api/admin/usersendpoint can return the suspended set.bunyip-web exposes this as an Active/Suspended toggle on the users page. The Suspended view tags each row and offers a single Reactivate action wired to a new
/admin/users/:id/reactivateroute, which PUTsactive=trueto the status endpoint; reactivation returns the admin to the Suspended view.#BUNYIP-120