feat(auth): merge reporter, supervisor, capa_owner into ssa role
Add Site Safety Assistant (ssa) role replacing reporter, supervisor and capa_owner. Portals move under /ssa (overview, my-reports, incidents, capas). Update RLS, schema, API role checks, notification recipients, nav and tests. Add db/ops/2026-11-06-merge-roles-into-ssa.sql (not yet applied; needs owner go-ahead and a pg_dump first). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
701fefd286
commit
813395700f
@@ -2,7 +2,7 @@
|
||||
import { describe, it, expect, vi } from 'vitest'
|
||||
|
||||
vi.mock('@/lib/auth/get-session', () => ({
|
||||
getSession: async () => ({ sub: 'owner-1', role: 'capa_owner' }),
|
||||
getSession: async () => ({ sub: 'owner-1', role: 'ssa' }),
|
||||
}))
|
||||
vi.mock('@/lib/db/audit', () => ({ writeAuditLog: vi.fn() }))
|
||||
vi.mock('@/lib/db/with-user', () => ({
|
||||
|
||||
Reference in New Issue
Block a user