i wnan user can insert a record where user provide all field but user can not update some field uid and user_id and rest field can update
{
"roles": [
{
"name": "readAndWriteAll",
"apply_when": {},
"document_filters": {
"write": {
"ownerId": "%%user.id"
},
"read": {
"uid": {
"$in": "%%user.custom_data.list"
}
}
},
"fields": {
"address": {
"write": true
},
"city": {
"write": true
},
"district": {
"write": true
},
"expireOn": {
"write": false
},
"isActive": {
"write": true
},
"landmark": {
"write": true
},
"name": {
"write": true
},
"ownerId": {
"write": false
},
"uid": {
"write": false
}
},
"read": true,
"insert": true,
"delete": false,
"search": true
}
]
}
i have this rule but when i insert the data it throw error that expireOn and ownerId uid can not be written insert denied
what should i modify to allow this