Skip to main content

Table configuration patterns

Owner-based access

Users access rows where ownerColumn matches their user ID.

Organization-based access

Users access rows where orgColumn matches any of their organization memberships.

Admin bypass

Users with the specified scope bypass ownership restrictions.

Group membership access

Users with the required scope and group membership can access matching rows.

Scope-gated access

No owner — access is purely scope-based.

Inherited access

Child entity inherits all access rules from the parent.

Access evaluation order

  1. Owner access (ownerColumn match)
  2. Group membership access (scope + membership)
  3. Bypass scopes (scope match)

RLS context

Injected automatically into every ctx.db query:

Pattern selection guide