-
Add createdByUsername field and boot-time admin seed/backfill · a1400904
Adds AdminTransaction.createdByUsername (default null) so future permission-scoped views can attribute data to a user, plus a new app/libs/adminBootstrap.js that seeds the first admin account from ADMIN_USER/ADMIN_PASSWORD on boot and backfills any pre-existing transaction lacking createdByUsername to that admin. Wired into server.js's mongoose 'open' handler. Idempotent across repeated boots. Co-Authored-By:Claude Sonnet 5 <noreply@anthropic.com>
tdgiang authoreda1400904
×