Skip to content

Instantly share code, notes, and snippets.

@cionman
Created December 4, 2017 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cionman/2380adb0275d28712822651044e6f523 to your computer and use it in GitHub Desktop.
Save cionman/2380adb0275d28712822651044e6f523 to your computer and use it in GitHub Desktop.
데이터베이스 권한
{
"rules": {
"FcmId": {
"$uid": {
".read": "$uid === auth.uid",
".write": "$uid === auth.uid"
}
},
"Users": {
".read": "auth != null",
"$uid": {
".read": "auth != null",
".write": "$uid === auth.uid"
}
},
"UsersConnection": {
".read": "auth != null",
".write": "auth != null"
},
"Messages": {
"$roomId" : {
".read": "root.child('RoomUsers').child($roomId).child(auth.uid).exists()",
".write": "root.child('RoomUsers').child($roomId).child(auth.uid).exists()",
"$msgId" :{
".read": "root.child('RoomUsers').child($roomId).child(auth.uid).exists()",
".write": "root.child('RoomUsers').child($roomId).child(auth.uid).exists()"
}
}
},
"UserRooms" :{
"$uid":{
".read": "$uid === auth.uid",
"$roomId" :{
".read" : "root.child('RoomUsers').child($roomId).child(auth.uid).exists()",
".write": "root.child('RoomUsers').child($roomId).child(auth.uid).exists()"
}
}
},
"RoomUsers" :{
"$roomId":{
"$uid":{
".read": "auth != null",
".write": "auth != null"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment