User Accounts & Profiles (Issue #1) #9
Reference in New Issue
Block a user
Delete Branch "feature/issue-1-user-accounts"
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?
Summary
Implements Issue #1 — User Accounts & Profiles.
/auth/registerremovedactiveflag; inactive name display handled in frontendNew schema columns
is_trainee,phone,operational_roles,notification_preference,admin_notes,last_login,invite_token,invite_expires_at— added viaALTER TABLE … ADD COLUMN IF NOT EXISTSfor existing deployments.New / changed API endpoints
POST/auth/activatePOST/api/v1/volunteersPOST/api/v1/volunteers/{id}/invitePUT/api/v1/volunteers/{id}POST/auth/registerFrontend pages
/activate?token=…— public invite activation page/profile— volunteer self-edit (name + phone)/volunteers— full admin management: create, trainee promotion, notes, invite resendTest plan
.gitea/workflows/ci.ymlrunsgo vet,go test,tsc --noEmit, andnpm teston every push and PRCloses #1
- Admin-only account creation (no self-registration); invite-token flow replaces the public /auth/register endpoint - New volunteer fields: phone, is_trainee, operational_roles, notification_preference, admin_notes, last_login, completed_shifts - Role-scoped profile editing: volunteers update name/phone only; admins update all fields including notes and trainee flag - /auth/activate endpoint for invite-token-based account activation - /api/v1/volunteers/{id}/invite for admin to resend invite links - last_login recorded on each successful authentication Tests: - Go: handler tests (auth rules, create, activate, update scoping) via Storer/AuthServicer interfaces and fake store; auth unit tests for HashPassword, IssueToken, and Parse - Frontend: RTL tests for Activate, Profile, and Volunteers pages - Fixed CRA 5 + React Router v7 Jest compatibility (moduleNameMapper + TextEncoder polyfill) - Replaced stale CRA App.test.tsx placeholder with real tests CI: - .gitea/workflows/ci.yml runs go vet, go test, tsc, and npm test on every push and pull request Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>c57f4b67ffto6c9746eb05