我有一个与IMDB ID一起使用的数据库,并且在它们下面有一些类别。我想给任何用户,无论是否具有身份验证权限,都可以创建这些类别,并修改其中一些内容,但不修改其他内容。我可以用什么样的通配符代替任何IMDB ID
看起来大致像这样
"Movies"
|
|
|_______$IMDB_ID //Should be read/writeable by anyone
|
|
|
__________Detail 1 //read/writeable by anyone
| |
| |___Detail Name //read-writeable by anyone
| |
| |___Detail Score //readable by anyone, writeable with authentication
| |
| |____Detail Tally //readable by anyone, writeable with authentication
|
____________Detail 2
|
|____Detail Name
|
|____Detail Score
|
|____Detail Tally
答案 0 :(得分:0)
看起来你要求这个:
{
"rules": {
"Movies": {
".read": true,
"$IMDB_ID": {
"$DetailId": {
"Detail_Name": { ".write": true },
"Detail_Score": { ".write": "auth !== null" }
"Detail_Tally": { ".write": "auth !== null" }
}
}
}
}
}