Skip to content

fix(security): seed demo account as user, not admin (P4.4) - #54

Merged
franciszver merged 2 commits into
mainfrom
fix/p4-seed-demo-role
Jul 24, 2026
Merged

fix(security): seed demo account as user, not admin (P4.4)#54
franciszver merged 2 commits into
mainfrom
fix/p4-seed-demo-role

Conversation

@franciszver

Copy link
Copy Markdown
Owner

Closes #50

Summary

The Prisma seed created the demo account (demo@lexforge.app) with role: 'admin', which grants cross-user audit-log visibility. Downgraded to role: 'user'. Single-line change (seed.js:360), no other admin dependency in the seed.

OWNER-GATED (does not block this fix)

Confirm whether seed.js was ever run against the Neon prod DB. render.yaml does not auto-run it, but if it was run manually, the weak-password admin account is live and should be rotated/removed in prod after this merge.

Red-first / tests

Red commit b761147 (assert seeded demo user role is user, initially failing on 'admin') → green 03b2d88. Added upsert to the fake Prisma client to support the seed test.

Verification

server/ npm test: 233 passed.

Gate

One-line role change + red test; diff reviewed directly, no secrets, no other logic touched.

Assisted-by: Claude Code (Fable orchestrator + Haiku implementer)

franciszver and others added 2 commits July 24, 2026 06:07
Assisted-by: Claude Code (Haiku)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Assisted-by: Claude Code (Haiku)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@franciszver
franciszver merged commit f88382d into main Jul 24, 2026
2 checks passed
@franciszver
franciszver deleted the fix/p4-seed-demo-role branch July 24, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P4.4: Downgrade seeded demo account from admin to user role

1 participant