我正在尝试使新帖子对象只能由存储在每个帖子中的"成员"字典中的用户读取.我一直得到"7:17:无效==表达式:左操作数不是数字,布尔值,字符串或null." 在.read规则上:
{
"rules": {
"posts" : {
".write":true,
"$post" : {
".read": "data.child('members').child(auth.uid) == true"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我在我生成的令牌中传递'uid'参数:https://www.firebase.com/docs/security/custom-login.html
目的是仅允许其成员数组中存在的用户读取帖子.我找不到有关在firebase文档,谷歌群组或谷歌搜索中访问嵌套数据的任何示例:-(
允许/可能吗?
firebase ×1