Feat/ssa role #1

Merged
admin merged 3 commits from feat/ssa-role into main 2026-11-06 21:58:38 +08:00
3 Commits
Author SHA1 Message Date
adminandClaude Sonnet 5.5 4ec37bd078 test(layout): update app-shell search test for ssa role
ssa now has a site incident list, so its header search targets /ssa/incidents.
Use management for the no-search case.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 21:50:59 +08:00
Weei HanandClaude Sonnet 5.5 f52e63ad09 fix(db): make ssa role migration a single self-contained transaction
Drop and recreate auth_user_role() for the new user_role enum and re-apply all RLS policies inside the migration, so no separate db/rls.sql step is needed and there is no access gap.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 21:41:08 +08:00
Weei HanandClaude Sonnet 5.5 813395700f 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>
2026-11-06 21:34:10 +08:00