【发布时间】:2020-09-26 02:30:44
【问题描述】:
我正在通过练习 firebase 快速启动程序来修改它。
我已经用这种方式重写了规则和数据。
数据
{"admin-users" :
{
"my-uid" : true
},
"messages" :
{
"-ABCD" : {
"name" : "Mary",
"text" : "Hi"
},
"-K2ib4H77rj0LYewF7dP" : {
"name" : "anonymous",
"text" : "Hello"
},
"-K2ib5JHRbbL0NrztUfO" : {
"name" : "anonymous",
"text" : "how are you"
}
}
}
规则
{
"rules": { ".read": "auth !
".read": "auth ! = null",
".write": "root.child('admin-users').child( auth.uid).exists()",
}
}
我已成功禁用除“my-uid”之外的所有内容,但我无法弄清楚如何引用它,所以我得到了一个文本框和一个“发送”按钮,等等。你会被丢在尘土里。 有没有办法从客户端引用它?请。
【问题讨论】:
标签: java firebase firebase-realtime-database firebase-security