/** * Data Transparency page route -- /_authenticated/transparency * * Displays a filterable timeline of every KMS credential access event. * Uses the global org selector in the header for tenant context. * Admin-only access (tenant_admin, super_admin). * * Phase 31 -- TRUST-01, TRUST-02 */ import { createFileRoute } from '@tanstack/react-router' import { Building2, Eye } from 'lucide-react' import { useAuth, isSuperAdmin, isTenantAdmin } from '@/lib/auth' import { useUIStore } from '@/lib/store' import { TransparencyLogTable } from '@/components/transparency/TransparencyLogTable' export const Route = createFileRoute('/_authenticated/transparency')({ component: TransparencyPage, }) function TransparencyPage() { const { user } = useAuth() const isSuper = isSuperAdmin(user) const isAdmin = isTenantAdmin(user) const { selectedTenantId } = useUIStore() const tenantId = isSuper ? (selectedTenantId ?? '') : (user?.tenant_id ?? '') // RBAC: require at least admin role (tenant_admin or super_admin) if (!isAdmin) { return (
You need admin permissions to view the transparency dashboard.
Track every credential access event across your devices
Select an organization from the header to view transparency logs.