One thing that might need an observation here is that security rules cascade--which means that, if you grant read or write privileges to a user on any node, you automatically grant that user read or write privileges on all child nodes. If you ask to read a node which has read permission, Firebase will return the entire node and all of its children. This means that Firebase won't go down parsing through the node based on nested security. The same thing applies with write actions. If you're allowed to write to a node, you're allowed to overwrite everything. Looking at these points it might look like the cascading security rule is a problem, but if you structure data according to the privileges that you want to ...
Add security to data structure
Get Expert Android Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.