I am working on a project where I need to limit the answers to a specific post. I am trying to create a rule where the write
tag allows or not the operation based in the amount of existing answers. The actual JSON looks like this:
"root": {
"posts": {
"$post_id": {
// all other post stuff here
answers: { // <== this is the path that i must allow or not the write operation based on the child node count
"$userId_thatAnswered": { //user object here }
}
}
}
}
does anyone know how I could perform this security?