1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//有权限的user才能访问

{
"rules": {
"users": {
"$uid": {
// grants write access to the owner of this user account whose uid must exactly match the key ($uid)
".write": "auth !== null && auth.uid === $uid",

// grants read access to any user who is logged in with Twitter
".read": "auth !== null"
}
}
}
}

// 任何人都可以访问

{
"rules": {
".read": true,
".write": true
}
}