1
0
forked from wrenn/wrenn
Co-authored-by: Tasnim Kabir Sadik <tksadik@omukk.dev>

Reviewed-on: wrenn/wrenn#50
This commit is contained in:
2026-05-24 21:10:37 +00:00
parent 4707f16c76
commit 05ddf62399
203 changed files with 15815 additions and 9344 deletions

View File

@ -17,9 +17,10 @@ type AuthContext struct {
Email string // empty when authenticated via API key
Name string // empty when authenticated via API key
Role string // owner, admin, or member; empty when authenticated via API key
IsAdmin bool // platform-level admin; always false when authenticated via API key
APIKeyID pgtype.UUID // populated when authenticated via API key; zero value for JWT auth
APIKeyName string // display name of the key, snapshotted at auth time; empty for JWT auth
IsAdmin bool // session-cached flag; admin gates always re-verify against the DB
APIKeyID pgtype.UUID // populated when authenticated via API key; zero value for session auth
APIKeyName string // display name of the key, snapshotted at auth time; empty for session auth
SessionID string // populated for cookie-session auth; empty for API key auth
}
// WithAuthContext returns a new context with the given AuthContext.