feat(db): activate personal preference RLS#600
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
life-ustc | 1f8f6e1 | Commit Preview URL Branch Preview URL |
Jul 22 2026, 11:03 AM |
There was a problem hiding this comment.
Pull request overview
This PR activates PostgreSQL Row Level Security (RLS) for personal-preference tables and extends CI coverage so the runtime-role job exercises the new RLS behavior under least-privilege grants, aligning with the ongoing RLS rollout in #550 after the context plumbing from #599.
Changes:
- Enable + FORCE RLS and add owner-isolation policies for
DashboardLinkClick,DashboardLinkPin, andBusUserPreference. - Add an integration test suite that validates default-deny, concurrent owner isolation, and forged-owner rejection for the three tables.
- Update the DB-backed CI job to grant runtime-role permissions for the new tables and run the RLS integration suites in separate Vitest processes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/integration/personal-preferences-rls.test.ts | Adds integration coverage for personal-preference RLS (default-deny, isolation, forged-owner rejection). |
| prisma/migrations/20260722174500_personal_preferences_rls/migration.sql | Activates RLS + FORCE RLS and defines owner isolation policies for three personal-preference tables. |
| .github/workflows/db-backed-bun-job.yml | Extends runtime-role grants and runs Todo + personal-preference RLS suites in separate Vitest runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
E2E HTML report is ready: https://life-ustc.github.io/e2e-snapshot-artifacts/reports/29914165691/index.html |
# [1.77.0](v1.76.0...v1.77.0) (2026-07-22) ### Features * **db:** activate personal preference RLS ([#600](#600)) ([961fa6d](961fa6d))
|
🎉 This PR is included in version 1.77.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Part of #550
Summary
DashboardLinkClick,DashboardLinkPin, andBusUserPreferenceafter refactor(db): route personal preferences through RLS context #599 deployed their transaction-local context plumbingThis still does not close #550.
Upload/UploadPendingandHomeworkCompletionrequire the public-read policy decisions documented in the issue before activation.Verification
bash -n; touched test passes Biome