The delete permission controls how existing documents in a collection can be removed. It defines which documents can be deleted, how the operation is constrained, and which real-time events are triggered upon deletion.
q Defines the query condition for deleting documents. This ensures that users can only remove documents matching specific criteria, such as ownership constraints.
io Describes real-time events that should be triggered upon document deletion, specifying which users should receive notifications about the removal.
{
"collections": {
"todos": {
"schema": {...},
"permissions": {
"user": {
"delete": {
"q": {
"user": "$.auth._id"
},
"io": {
"$.user": ["_id"]
}
}
}
}
}
}
}