6 Commits

Author SHA1 Message Date
fcab68f57a feat(db): track class-management schema + add as-user RLS
The classes/class_teachers/class_students/enrollment_requests tables existed
only on live dev (.94) with no tracked DDL, and RLS exposed class_students /
class_teachers to service_role ONLY — so any API path calling Supabase as the
user read zero rows.

- 71-class-management.sql captures the real schema (idempotent), adds SECURITY
  DEFINER membership helpers, and adds as-user RLS policies (cs_read/cs_write,
  ct_read/ct_write, classes_admin_write, er_class_staff) while preserving the
  existing service_role / institute_read / er_own policies.

Applied + verified on dev .94: class teacher sees roster (1), unrelated teacher
denied (0), service_role unaffected (full). FKs/uniques/checks already present
on .94 (no constraint changes needed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 14:43:29 +00:00
bc674ea696 fix(kong): persist Supabase CORS config 2026-05-27 16:51:28 +01:00
c85f4b4484 fixed volume mount names in docker-compose.yml, fixed naming consistence in 70-add-directory-support.sql 2026-02-23 17:42:54 +00:00
3b24453bb0 cc changes back 2026-02-22 21:54:19 +00:00
dde8450e7e reset 2026-02-22 21:36:47 +00:00
31ecf136f7 feat: reorganize supabase config - flat db init structure, add edge functions, mcp, kong api config 2026-02-22 00:31:50 +00:00