Skip to content

Instantly share code, notes, and snippets.

@edrex
Created September 19, 2013 16:31
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 edrex/6626021 to your computer and use it in GitHub Desktop.
Save edrex/6626021 to your computer and use it in GitHub Desktop.
{
"rules": {
".read": true,
"messages": {
".read": true,
"$msg": {
".validate": "newData.child('user_id').val() == auth.id && newData.child('provider').val() == auth.provider",
".write": "!data.exists() && auth != null"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment