Configure RLS policies for activity_types
epic-activity-type-configuration-foundation-task-002 — Define and apply Row Level Security policies on the activity_types table scoped by org_id. Ensure coordinators and peer mentors can read only their organisation's activity types, and that only org admins can insert, update, or delete records.
Acceptance Criteria
Technical Requirements
Execution Context
Tier 1 - 540 tasks
Can start after Tier 0 completes
Implementation Notes
JWT claims structure must be agreed with the auth configuration. Confirm that the Supabase JWT includes org_id and role as top-level custom claims — check the auth.users and auth hook configuration. If org_id is nested (e.g., under app_metadata), update the policy expression accordingly: (auth.jwt() -> 'app_metadata' ->> 'org_id')::uuid. Use separate CREATE POLICY statements for each operation rather than combining them, as this makes auditing and modification easier.
Name policies consistently using the pattern