Skip to content

Instantly share code, notes, and snippets.

@andi0068
Last active January 18, 2024 03:12
Show Gist options
  • Save andi0068/f81aa2e83d9667ae72e3740c1f0ad559 to your computer and use it in GitHub Desktop.
Save andi0068/f81aa2e83d9667ae72e3740c1f0ad559 to your computer and use it in GitHub Desktop.
{
"rules": {
"user_groups": {
".read": true, // public
".write": "root.child('user_groups/admins/users/' + auth.uid).exists()", // admins
"members": {
"users": {
"$id": {
".write": "auth.uid === $id" // owner
}
}
}
},
"users": {
".read": "root.child('user_groups/admins/users/' + auth.uid).exists()", // admins
".write": false,
"$id": {
".read": "auth.uid === $id", // owner
".write": "auth.uid === $id" // owner
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment