Here is a data structure in Firebase :
{
"wall" : {
"-cxwcxwcxw" : {
"name" : "hello",
"status" : 0
},
"-cxwfdscxw" : {
"name" : "stack",
"status" : 0
},
"-cxfdsqcxw" : {
"name" : "overflow",
"status" : 1
}
}
}
I want to only allow reading wall's item where status is 0, in the list scope. I mean get the list of wall's item that where status is 0;
So my rules are :
{
"wall": {
"$wall_item_id": {
".read": "data.child('status').val() === 0"
}
}
}
What is going wrong ?
EDIT :
I have checked with the Simulator, and I cannot get access to the list, but I can access to the items itself (where status == 0)