Skip to content

RLS enforcement analysis#3526

Draft
gilgardosh wants to merge 1 commit into
mainfrom
rls-enforcement-analysis
Draft

RLS enforcement analysis#3526
gilgardosh wants to merge 1 commit into
mainfrom
rls-enforcement-analysis

Conversation

@gilgardosh

Copy link
Copy Markdown
Collaborator

No description provided.

@gilgardosh gilgardosh self-assigned this May 12, 2026
@gilgardosh
gilgardosh temporarily deployed to accounter-fullstack May 12, 2026 08:18 — with GitHub Actions Inactive
@gilgardosh
gilgardosh temporarily deployed to accounter-fullstack May 12, 2026 08:18 — with GitHub Actions Inactive

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
WHERE owner_id = accounter_schema.current_business_id()
WHERE owner_id = accounter_schema.get_current_business_id()

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

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 ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant