Skip to content

Instantly share code, notes, and snippets.

@wonglok
Last active February 14, 2022 00:59
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 wonglok/dfeda47cbfa72310201ea85b6bddf198 to your computer and use it in GitHub Desktop.
Save wonglok/dfeda47cbfa72310201ea85b6bddf198 to your computer and use it in GitHub Desktop.
effect node by you rules json
{
"rules": {
".read": true,
".write": false,
//
//
"profile": {
"$owner_user_id": {
".read": "true",
"canvas": {
".read": "true",
"$canvasID": {
".read": "true",
".write": "auth !== null && auth.uid === $owner_user_id",
"shareACL": {
".write": "auth !== null && auth.uid === $owner_user_id"
},
"ownerACL": {
".write": "auth !== null && auth.uid === $owner_user_id"
}
}
},
"layout": {
".read": "true",
"$canvasID": {
".write": "auth !== null && auth.uid === $owner_user_id",
"shareACL": {
".write": "auth !== null && auth.uid === $owner_user_id"
},
"ownerACL": {
".write": "auth !== null && auth.uid === $owner_user_id"
}
}
}
}
},
"canvas": {
"$canvasID": {
"$ownerID": {
".read": true,
".write": "auth !== null && auth.uid === $ownerID || auth !== null && root.child('profile').child($ownerID).child('canvas').child($canvasID).child('shareACL').hasChild(auth.uid)"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment