Firebase Security: read-only parent node, but writable child nodes -


can have read-only parent node, allow write leaf node?

use-case:

user parent testimonial children

i'd let authenticated user read own user object, allow them write testimonials other user.

or shoud down 2 parent level nodes user id linked?

thanks.

yes - can.

setup more restrictive .write rule @ parent rule, setup less restrictive .write rule @ leaf node.

for example:

{    "root": {        "parent": {             "$user": {                  ".write": false,                  ".read": true,                                      "leaf": {                      ".write": true                  }              }        } } 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -