Understanding the limits of Cloud Firestore's security rules
问题 I'm writing the security rules for my Firestore database, and I got to the point where I'm probably writing too many checks and the authorization automatically fails. For example the rules for a specific path are service cloud.firestore { match /databases/{database}/documents { match /pending/{userId} { match /rate/{vendorId}/events/{eventId}/ratings/{rateId} { allow write: if request.auth.uid == userId && exists(/databases/$(database)/documents/vendors/$(vendorId)) // The vendor must exist &