feat(admin): add reactivation affordance + endpoint for suspended users #157

Merged
David merged 2 commits from feat/BUNYIP-120-admin-user-reactivate into main 2026-06-17 12:46:37 +02:00
Owner

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 set active=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_paginated gains an active: Option<bool> selector: the default (None/Some(true)) still lists live accounts, Some(false) lists soft-deleted ones. The admin list handler forwards a new active query param so the bunyip-api /admin/users endpoint 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/reactivate route, which PUTs active=true to the status endpoint; reactivation returns the admin to the Suspended view.

#BUNYIP-120

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 set `active=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_paginated` gains an `active: Option<bool>` selector: the default (`None`/`Some(true)`) still lists live accounts, `Some(false)` lists soft-deleted ones. The admin list handler forwards a new `active` query param so the bunyip-api `/admin/users` endpoint 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/reactivate` route, which PUTs `active=true` to the status endpoint; reactivation returns the admin to the Suspended view. #BUNYIP-120
feat(admin): add reactivation affordance + endpoint for suspended users
All checks were successful
Check / fmt / clippy / build / test (pull_request) Successful in 1m58s
acce4f900f
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 set `active=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_paginated` gains an `active: Option<bool>` selector: the default (`None`/`Some(true)`) still lists live accounts, `Some(false)` lists soft-deleted ones. The admin list handler forwards a new `active` query param so the bunyip-api `/admin/users` endpoint 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/reactivate` route, which PUTs `active=true` to the status endpoint; reactivation returns the admin to the Suspended view.

#BUNYIP-120
Merge branch 'main' into feat/BUNYIP-120-admin-user-reactivate
Some checks failed
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt / clippy / build / test (pull_request) Failing after 16s
c8e2416690
David merged commit cd3f4948e9 into main 2026-06-17 12:46:37 +02:00
David deleted branch feat/BUNYIP-120-admin-user-reactivate 2026-06-17 12:46:37 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!157
No description provided.