feat(admin): edit email, force-verify, and clear 2FA on user detail #155

Merged
David merged 2 commits from feat/BUNYIP-119-admin-user-edit-email-2fa into main 2026-06-17 12:44:35 +02:00
Owner

The admin User detail surface showed email, email_verified, and two_factor_enabled read-only with no way to act on them (BUNYIP-119). An admin could not correct a user's address, force-verify it, or clear a stuck second factor.

Add three admin endpoints on bunyip-api: PUT /admin/users/{id}/email (normalizes + validates the address, rejects a collision with another live account, optionally marks it verified), POST /admin/users/{id}/email/verify (force-verify), and POST /admin/users/{id}/two-factor/reset (delete the TOTP secret + recovery codes and clear the flag so a locked-out user can re-enrol). Each writes an audit-log entry via three new admin AuditAction variants.

Wire the matching bunyip-web BFF client calls, POST handlers, and routes, and add an "Identity & security" card to the user-detail page with an inline email-edit form (plus a "mark verified" checkbox), a Force-verify button shown only while the address is unverified, and a Clear 2FA button shown only while a second factor is enabled.

#BUNYIP-119

The admin User detail surface showed email, email_verified, and two_factor_enabled read-only with no way to act on them (BUNYIP-119). An admin could not correct a user's address, force-verify it, or clear a stuck second factor. Add three admin endpoints on bunyip-api: PUT /admin/users/{id}/email (normalizes + validates the address, rejects a collision with another live account, optionally marks it verified), POST /admin/users/{id}/email/verify (force-verify), and POST /admin/users/{id}/two-factor/reset (delete the TOTP secret + recovery codes and clear the flag so a locked-out user can re-enrol). Each writes an audit-log entry via three new admin AuditAction variants. Wire the matching bunyip-web BFF client calls, POST handlers, and routes, and add an "Identity & security" card to the user-detail page with an inline email-edit form (plus a "mark verified" checkbox), a Force-verify button shown only while the address is unverified, and a Clear 2FA button shown only while a second factor is enabled. #BUNYIP-119
feat(admin): edit email, force-verify, and clear 2FA on user detail
All checks were successful
Check / fmt / clippy / build / test (pull_request) Successful in 2m9s
d63840cf38
The admin User detail surface showed email, email_verified, and two_factor_enabled read-only with no way to act on them (BUNYIP-119). An admin could not correct a user's address, force-verify it, or clear a stuck second factor.

Add three admin endpoints on bunyip-api: PUT /admin/users/{id}/email (normalizes + validates the address, rejects a collision with another live account, optionally marks it verified), POST /admin/users/{id}/email/verify (force-verify), and POST /admin/users/{id}/two-factor/reset (delete the TOTP secret + recovery codes and clear the flag so a locked-out user can re-enrol). Each writes an audit-log entry via three new admin AuditAction variants.

Wire the matching bunyip-web BFF client calls, POST handlers, and routes, and add an "Identity & security" card to the user-detail page with an inline email-edit form (plus a "mark verified" checkbox), a Force-verify button shown only while the address is unverified, and a Clear 2FA button shown only while a second factor is enabled.

#BUNYIP-119
Merge branch 'main' into feat/BUNYIP-119-admin-user-edit-email-2fa
Some checks failed
Check / fmt / clippy / build / test (pull_request) Failing after 2s
Create release / Create release from merged PR (pull_request) Has been skipped
e9b2914d94
David merged commit 0d612ea12b into main 2026-06-17 12:44:35 +02:00
David deleted branch feat/BUNYIP-119-admin-user-edit-email-2fa 2026-06-17 12:44:35 +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!155
No description provided.