I have this database structure:
I want the js SDK to be able to write to all the nodes. However, I want to disable .read on the ip node. So when snapchat.val(); is called it returns everything but the ip value.
I have this database structure:
I want the js SDK to be able to write to all the nodes. However, I want to disable .read on the ip node. So when snapchat.val(); is called it returns everything but the ip value.
Instead of having all the details at the same level in the tree, you can create two nodes. One which you call public and the other which you call private.
Here is an example of what you could do:
Then, if you want to read the ip later, you could make sure that the user is authorised to be able to read the private_info if that is needed. Or, you could use cloud functions to do something with this data which its access is not limited by rules.