db.l3.ai

Play

lessons

what-changed-in-19

editor

engine: not started

results

Run a query to see rows here.

check

Boss: multi-tenant

Two tables, one rule: role tenant_app sees and changes only rows whose tenant_id equals the setting app.tenant. Create notes and tasks and secure both. Six hidden statements test it.

task

Create notes(note_id, tenant_id, body) and tasks(task_id, tenant_id, title) so role tenant_app sees and changes only rows whose tenant_id equals app.tenant. Six hidden statements test it.

hints