So my firestore database is structured as such:
documents -> collection -> docID -> collections -> documents
Inside the docID document I have a field called live which is a boolean set to either true or false. If live is true, I want to allow access to all documents and subdocuments, but if its false do not allow read. I've tried structuring it as such:
match /collections/{docID} {
allow read: if resource.data.live == true;
allow write: if false;
}
What is incorrect with this code?