Skip to content

Instantly share code, notes, and snippets.

@georgesboris
Last active October 16, 2017 18:53
Show Gist options
  • Save georgesboris/e7779678b205cc7e3d58046add5ac6b1 to your computer and use it in GitHub Desktop.
Save georgesboris/e7779678b205cc7e3d58046add5ac6b1 to your computer and use it in GitHub Desktop.
firebase-app - rules - actions
module.exports = {
__setup__: 'actions',
// notice we are defining the rules for a task with this ID.
// this has nothing to do with paths. we may access this task payload as shown below.
// here we're checking if the post we're updating was created by the authenticated user.
updatePost: `newData.child('createdBy').val() == auth.uid`
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment