I have two collections:
private_books
public_books
I want that public_books(all its sub-categories) only be accessed by admin (node.js) and private_books(all its sub-categories) for authorized people(logged in with accounts) and admin both.
How can I achieve this? I am new to Firebase.
Currently Firestore is in test mode anyone can access these collections.
Edit: as there is no need to add rules for firebase admin. I want security rules for public_books collection so that no-one can edit or change this collection and another different security rule for private_books collection so that only authorized users can view this collection.