RLS enforcement analysis#3526
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new documentation file, docs/rls-enforcement-analysis.md, which provides a detailed analysis of Row Level Security (RLS) enforcement for the accounter_schema. It categorizes tables based on whether they require RLS and discusses implementation strategies for tables with indirect ownership. The review feedback correctly identified a naming discrepancy in a SQL example, suggesting the use of get_current_business_id() instead of current_business_id() to maintain consistency with the actual codebase.
| ```sql | ||
| account_number IN ( | ||
| SELECT account_number FROM accounter_schema.financial_accounts | ||
| WHERE owner_id = accounter_schema.current_business_id() |
There was a problem hiding this comment.
The function name in the SQL example is current_business_id(), but the actual function defined in the migrations (e.g., in packages/migrations/src/actions/2026-02-10T12-05-00.create-rls-helper-function.ts) is get_current_business_id(). Updating this will ensure the documentation is accurate and the example is functional.
| WHERE owner_id = accounter_schema.current_business_id() | |
| WHERE owner_id = accounter_schema.get_current_business_id() |
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@accounter/client |
0.0.12-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
@accounter/gmail-listener |
0.1.2-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
@accounter/green-invoice-graphql |
0.8.6-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
@accounter/hashavshevet-mesh |
0.2.12-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
@accounter/israeli-vat-scraper |
0.1.12-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
@accounter/modern-poalim-scraper |
0.10.6-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
@accounter/payper-mesh |
0.2.12-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
@accounter/pcn874-generator |
0.6.7-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
@accounter/scraper-app |
0.0.2-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
@accounter/server |
0.0.12-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
@accounter/shaam-uniform-format-generator |
0.2.6-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
@accounter/shaam6111-generator |
0.1.8-alpha-20260512082000-7c0974450bc86d3382101b102af060bbde8adc7f |
npm ↗︎ unpkg ↗︎ |
No description provided.