fix: Display user email instead of Auth0 UID in audit logs (refs #10)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 4m40s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 37s
Deploy to Staging / Verify Staging (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 5s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped

- Add userEmail field to AuditLogEntry type in backend and frontend
- Update audit-log repository to LEFT JOIN with user_profiles table
- Update AdminLogsPage to show email with fallback to truncated userId
- Update AdminLogsMobileScreen with same display logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Eric Gullickson
2026-01-11 12:30:57 -06:00
parent fbde51b8fd
commit 911b7c0e3a
5 changed files with 38 additions and 20 deletions

View File

@@ -268,11 +268,15 @@ const AdminLogsMobileScreen: React.FC = () => {
{/* Metadata */}
<div className="flex flex-wrap gap-x-4 gap-y-1 text-xs text-slate-500">
{log.userId && (
{log.userEmail ? (
<span className="truncate max-w-[180px]">
User: {log.userEmail}
</span>
) : log.userId ? (
<span className="truncate max-w-[150px]">
User: {log.userId.substring(0, 16)}...
</span>
)}
) : null}
{log.resourceType && log.resourceId && (
<span className="truncate max-w-[150px]">
{log.resourceType}: {log.resourceId.substring(0, 10)}...

View File

@@ -388,6 +388,7 @@ export interface UnifiedAuditLog {
category: AuditLogCategory;
severity: AuditLogSeverity;
userId: string | null;
userEmail: string | null;
action: string;
resourceType: string | null;
resourceId: string | null;