From a048ceb9eef6ff111df8ea4765245f199c7c78cb Mon Sep 17 00:00:00 2001 From: Oz Sayag Date: Wed, 4 Feb 2026 16:31:56 +0200 Subject: [PATCH] update RLS references in the cli skill --- skills/base44-cli/SKILL.md | 1 + skills/base44-cli/references/entities-create.md | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/skills/base44-cli/SKILL.md b/skills/base44-cli/SKILL.md index 3c33f05..549634b 100644 --- a/skills/base44-cli/SKILL.md +++ b/skills/base44-cli/SKILL.md @@ -202,6 +202,7 @@ npx base44 | ---------------------- | ------------------------------------------- | --------------------------------------------------- | | Create Entities | Define entities in `base44/entities` folder | [entities-create.md](references/entities-create.md) | | `base44 entities push` | Push local entities to Base44 | [entities-push.md](references/entities-push.md) | +| RLS Patterns | Row-level security examples and operators | [rls-examples.md](references/rls-examples.md) ⚠️ **READ FOR RLS** | #### Entity Schema (Quick Reference) diff --git a/skills/base44-cli/references/entities-create.md b/skills/base44-cli/references/entities-create.md index 29b40aa..2ad894d 100644 --- a/skills/base44-cli/references/entities-create.md +++ b/skills/base44-cli/references/entities-create.md @@ -376,12 +376,13 @@ There are two condition types you can use: } ``` -**Important limitations:** +**Important notes:** - `user_condition` only supports **simple equality** (e.g., `{ "role": "admin" }`) +- **Entity field filtering requires `data.` prefix:** Use `{ "data.fieldname": value }` to filter by entity field values - For `data.*` field comparisons, you can use operators: `$in`, `$nin`, `$ne`, `$all` - Logical operators `$or`, `$and`, `$nor` are available for combining conditions -- You cannot filter by entity field values directly (e.g., `{"status": "published"}`) -- Only user-related conditions are allowed + +⚠️ **For advanced RLS patterns and examples, see [rls-examples.md](rls-examples.md)** ### RLS Examples @@ -474,12 +475,14 @@ There are two condition types you can use: - **user_condition is equality only:** `user_condition` only supports exact match (e.g., `{ "role": "admin" }`) - no operators - **No comparison operators on user_condition:** `$gt`, `$lt`, `$regex`, `$expr`, `$where` are NOT supported for user conditions -- **No entity field filtering:** Cannot filter by entity field values (e.g., `{"status": "published"}`) - **No deeply nested templates:** Templates like `{{user.data.profile.department}}` may not work **Supported operators:** - **Logical operators:** `$or`, `$and`, `$nor` for combining multiple conditions - **Field operators (for `data.*` fields only):** `$in`, `$nin`, `$ne`, `$all` +- **Entity field filtering:** Use `data.` prefix to filter by entity field values (e.g., `{ "data.status": "published" }` or `{ "data.completed": true }`) + +⚠️ **See [rls-examples.md](rls-examples.md) for comprehensive RLS patterns and examples** ### Complex Access Patterns