I have a database schema like this:
- Posts
- unverified
- post_1
- post_2 ...
- unverified
And here is a shortened list of data in /posts/unverified path
{
"-L7xmY2HMeEImDZnZqTf" : {
"categorie" : 0,
"commonFields" : {...},
"fbKey" : "-L7YM7vEf8RpcxGUTpDE",
"images" : [...],
"specialFields" : {
"area" : "150",
"productPrice" : {
"currency" : "dollar",
"value" : "65000"
},
"requestType" : "sell",
"requesterType" : "personal",
"roomCount" : 3,
"suburbia" : "false"
},
"subCat" : 0,
"timestamp" : 1521011840178,
"uid" : "Fo5f6VonWgQVpsf6u80TPgoi2it2"
},
"-L7YNUZPL1-Dl7EhScEE" : {...},
"-L7YNUZPL1-fdfasfa" : {...},
"-L7YNUZPL1-ljljklfd" : {...},
"-L7YNUZPL1-lkjlkjfas" : {...},
}
And a firebase security rules defined as below
{
"rules": {
"posts": {
"unverified": {
".indexOn": "timestamp",
".read": "data.child('uid').val() === auth.uid"
As the rules show, I want to read unverified posts if the users id equal to the uid field in the post data
But every time i use the rules simulator ( or test the with the codes ) with the below configuration, its' giving Simulated read denied
error
Thanks for your helps
/posts/unverified
. You can get this by clicking the "Export JSON" link in your Firebase Database console. – Frank van Puffelenuid
property with the UID you're testing with. That would indeed make the simulator fail. – Frank van Puffelen-L7xmY2HMeEImDZnZqTf
and that post has uid propertyFo5f6VonWgQVpsf6u80TPgoi2it2
.. And i testposts/unverified/-L7xmY2HMeEImDZnZqTf
path withFo5f6VonWgQVpsf6u80TPgoi2it2
uid – Fakhruddin Abdi