在保护我的实时数据库方面,我需要您的帮助。因此,我想在我的pet>名称中添加诸如 .read:“ $ uid == auth.uid” 之类的安全规则,但是我无法从上面获取$ uid的引用。有什么帮助吗?我只想让我的pet> name仅对$ uid == auth.uid的用户可读。
{
"rules": {
"users": {
"$uid": {
".read": "$uid == auth.uid",
".write": "$uid == auth.uid",
"name": {
".read": "$uid == auth.uid",
".write": "$uid == auth.uid"
}
}
},
"pet": {
"name":{
".read": "auth != null",
".write": false
}
}
}
}