Skip to content

fix(authdb): system seed user on jdwlabs.com + id-robust role grants#30

Merged
jdwillmsen merged 2 commits into
mainfrom
feat/auth-seed-email-domain
Jun 18, 2026
Merged

fix(authdb): system seed user on jdwlabs.com + id-robust role grants#30
jdwillmsen merged 2 commits into
mainfrom
feat/auth-seed-email-domain

Conversation

@jdwillmsen

Copy link
Copy Markdown
Member

What

  • Move the bootstrap system user from system@jdw.comsystem@jdwlabs.com (owned domain).
  • Resolve users_roles grants by natural key (email + role_name) instead of hardcoded user_id/role_id.

Why

  • jdwlabs.com is the intended/owned domain going forward.
  • The hardcoded (1,1),(1,2),(1,3) mapping assumed identity values; the lookup form grants correctly regardless of what the GENERATED ALWAYS AS IDENTITY sequences assign.

Notes

  • Same result on a fresh DB; behavior only diverges if ids drift.
  • Already applied manually to non-prod (jdwlabs_non).

🤖 Generated with Claude Code

jdwillmsen and others added 2 commits June 18, 2026 02:32
Match the system bootstrap account to the owned jdwlabs.com domain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Assisted-by: Claude:Opus-4.8
Map users_roles via email/role_name lookup instead of hardcoded ids, so
the grant works regardless of the values the identity sequences assign.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Assisted-by: Claude:Opus-4.8
@jdwillmsen jdwillmsen force-pushed the feat/auth-seed-email-domain branch from 5bb0148 to ee08560 Compare June 18, 2026 07:32
@jdwillmsen jdwillmsen merged commit da2cbc4 into main Jun 18, 2026
1 check passed
@jdwillmsen jdwillmsen deleted the feat/auth-seed-email-domain branch June 18, 2026 07:44
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.

1 participant