next-firebase-course icon indicating copy to clipboard operation
next-firebase-course copied to clipboard

Update security rule for collection group queries

Open dosstx opened this issue 3 years ago • 0 comments

For some reason, I needed to update the security rule of this course from:

// Required for collection group queries match /posts/{postId} { allow read; }

to

// Required for collection group queries match /{path=**}/posts/{postId} { allow read; }

Otherwise I was getting permission denied errors. The docs also state this here: https://firebase.google.com/docs/firestore/security/rules-query#collection_group_queries_and_security_rules

dosstx avatar Feb 26 '21 20:02 dosstx