Can someone please explain why, while testing Firebase security rules the below two simulated writes which I think are essentially the same give different results?
Write1
Simulator location: /users/id123/state
Simulator data(JSON): {"data":"example}
Write2
Simulator location: /users/id123/
Simulator data(JSON): {"state":{"data":"example}}
Write 1 denies the wright at the "state":, ".write" line in the below rules.
Write 2 skips the "state":, ".write" line altogether.
This is an issue because I am updating multiple paths in one JSON update and its skipping rules.
Does anyone know why?
{
"rules":{
"users":{
"$userId":{
"state":{
".write":false,
".read":false
}
}
}
}
}