baasix_create_permission
Create role-based access control permissions by defining actions, allowed fields, and row-level security conditions for a collection.
Instructions
Create a new permission for role-based access control.
ACTIONS: create, read, update, delete
FIELDS:
["*"] for all fields
["name", "price"] for specific fields
CONDITIONS (Row-level security):
Uses same filter operators as queries
{"published": {"eq": true}} - only published records
{"author_Id": {"eq": "$CURRENT_USER"}} - only own records
RELCONDITIONS (Filter related data):
{"reviews": {"approved": {"eq": true}}} - only approved reviews in response
EXAMPLE: { "role_Id": "uuid", "collection": "products", "action": "read", "fields": ["*"], "conditions": {"published": {"eq": true}} }
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"role_Id": "<role_Id>",
"collection": "<collection>",
"action": "<action>"
},
"name": "baasix_create_permission"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Permission action | |
| fields | No | Allowed fields (["*"] for all) | |
| role_Id | Yes | Role ID (UUID) | |
| collection | Yes | Collection name | |
| conditions | No | Row-level security conditions using filter operators | |
| defaultValues | No | Default values auto-set on creation (e.g., {"author_Id": "$CURRENT_USER"}) | |
| relConditions | No | Filter conditions for related records in response |