skip to Main Content

Firebase – Firestore rules for not existing documents

Below code works if I have collection (in this case suppliers) function isNotRestrictedinSuppliers(){ let value=3; let suppliers=get(/databases/$(database)/documents/users/$(request.auth.uid)/settings/suppliers); return suppliers.data.suppliers_array.size() < value; //return true; } match /suppliers/{document=**}{ allow read,update, delete: if isSignedIn() && isValidUser(); //above is the same like allow write;…

VIEW QUESTION
Back To Top
Search