Reputation: 321
I have a Firebase project that, a few hours ago, stopped loading documents from collections, I can't see them from Firebase console. I don't know what happened, I'm using Safari on Mac and the only hint I have is the "notifications" voice in the top-right corner of the screen. It said that my security rules are too weak so I changed a little bit. Maybe my database rules aren't good take a look at them please :
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
First time dealing with this issue, any ideas?
Upvotes: 0
Views: 693
Reputation: 321
Solved adding 4 new rules! I think the solution is to add rules since each main collection (each root) has some.
service cloud.firestore {
match /bucket/{anyFile=**} {
allow read,write: if true;
allow update, delete : if false;
}
match /ids/tabs/{lettera}/{nome=**} {
allow read, create,get,list : if true;
allow update, delete : if false;
}
match /uids/{twoLetters}/{UserUid}/{anyDoc=**} {
allow create : if true;
allow read,get,list : if true;
allow update, delete : if false;
}
match /{stato}/{provincia}/{paese}/{lavoro}/users/{anyDoc=**} {
allow create,read,get,update,list : if true ;
allow delete : if false ;
}
}
I will change them later to keep all safer, but for now this solved.
Upvotes: 1