【发布时间】:2021-08-27 06:04:59
【问题描述】:
我有一个看起来像这样的 firebase 数据库
Cards
Group1
- 0
- isLight
- likes
- shares
- 1
- isLight
- likes
- shares
我需要写一个规则,只允许写喜欢和分享,并关闭它以允许读取,所以我写了
{
"rules": {
"Cards": {
".write": "false"
"Group1" : {
"0": {
"likes" : {
".read": "true",
".write": "true"
},
"shares" : {
".read": "true",
".write": "true"
}
}
}
}
}
}
我不想静态写 Group1 和 0,因为它们的数量没有限制,所以我需要用一般的东西代替它们,但我不知道
【问题讨论】:
标签: ios firebase-realtime-database firebase-security