mirror of
https://github.com/szimek/sharedrop.git
synced 2026-06-13 21:03:07 +08:00
25 lines
844 B
JSON
25 lines
844 B
JSON
{
|
|
"rules": {
|
|
"rooms": {
|
|
"$roomid": {
|
|
// You can see people in the room only if you are in it as well
|
|
".read": "auth != null && data.child('users').hasChild(auth.id)",
|
|
"users": {
|
|
"$userid": {
|
|
// You can add/update only your own info
|
|
".write": "auth != null && $userid == auth.id"
|
|
}
|
|
},
|
|
"messages": {
|
|
// You can send message to anybody in the room
|
|
".write": "auth != null",
|
|
"$userid": {
|
|
// You can read only messages sent to you
|
|
".read": "auth != null && $userid == auth.id"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|