0
我想读取所有用户名用户父节点,因为我在我的应用程序中使用搜索功能(如果提供searchActive:用户节点中的真子)。但电子邮件只能由所有者访问。如何阻止检索同一父节点中的孩子?
我刚刚尝试过如下,但我仍然收到电子邮件。我担心的不仅仅是电子邮件,我缺少什么以及如何组织所有这些信息?
"rules": {
"users": {
".read": "auth !== null",
"$uid": {
".write": "auth !== null && auth.uid === $uid",
".read": "auth !== null && auth.uid === $uid",
"username": {
".validate": "
!root.child('usernames').child(newData.val()).exists() ||
root.child('usernames').child(newData.val()).val() == $uid"
},
"email": {
".read": "auth.uid == 'facebook:'+$uid || auth.uid == $uid"
}
}
},
"usernames": {
".write": "auth !== null",
".read": "auth !== null"
},
@Arescet我知道什么意思是soflow,这是Firebase安全脚本,我上面解释了我在使用时遇到的情况。不要建议关于不相关的主题。 – tobeiosdev