Missing or insufficient permissions when writing to Firestore using field in access rules

后端 未结 3 1746
北海茫月
北海茫月 2021-02-03 19:55

I am getting an error when attempting to write to Firestore.

I am attempting to use a field containing the user uid for my security rule.

service cloud.f         


        
3条回答
  •  不知归路
    2021-02-03 20:26

    You can make your database available just for reading and not for writing:

      service cloud.firestore {
        match /databases/{database}/documents {
         match /{document=**} {
           allow read: if true;
           allow write: if false;
          }
       }
    }
    

提交回复
热议问题