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
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:
@@ -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)}...
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user