0
简单的引用工具。想要仅向“经销商”显示价格/定价。这个结构是否合适?安全节点的数据结构?
如果我把builds\$key\price
节点上的一个更具体的规则(限制价格的访问),那么它似乎非交易商试图读取.once
上builds\-Ke_yHGa-c-acXF5_J9B
会失败。
那么,我必须建立一个单独的prices
根节点吗?我想是这样...?
然后
{
"...some path...": {
".read": "root.child("dealers/" + auth.uid).val() === true"
}
}
在此先感谢。
{
"builds" : {
"-Ke_yHGa-c-acXF5_J9B" : {
"created" : 1488843260381,
"last modified" : false,
"model" : "1VR",
"price" : "1999.00",
"status" : "saved",
"title" : "test build",
"uid" : "q5b9AJgWATdbNF5y2JZctitx1Qx2"
}
},
"dealers" : {
"DsZ1wSUOmsceMKqCKLZwhpg1vjA3" : true,
"R9s2qY6p87cas750wJz5wAB3sfJ3" : false,
"q5b9AJgWATdbNF5y2JZctitx1Qx2" : true
},
"users" : {
"DsZ1wSUOmsceMKqCKLZwhpg1vjC2" : {
"displayName" : "Eric Doe",
"photoUrl" : "http://abs.twimg.com/sticky/default_profile_images/default_profile_3_normal.png",
"provider" : "twitter.com"
},
"R9s2qY6p87cas750wJz5wAB3sfk5" : {
"displayName" : "Ron Royston",
"email" : "[email protected]",
"provider" : "password"
},
"q5b9AJgWATdbNF5y2JZctitx1Qx2" : {
"displayName" : "Ron Royston",
"photoUrl" : "http://pbs.twimg.com/profile_images/809222728456675365/C-rlXjaN_normal.jpg",
"provider" : "twitter.com"
}
}
}
感谢您的确认。我花了大约3个小时才弄明白,我不得不考虑这件事。现在看着你的其他答案... –