允许读取firestore文档(如果它不存在)

时间:2018-04-17 11:31:10

标签: google-cloud-firestore firebase-security-rules

在Firestore中我不允许读取,如果目标文档不存在。我尝试过以下方法:

service cloud.firestore {
   match /databases/{database}/documents {

     match /reports/{report} {
        allow read: if !exists(/databases/$(database)/documents/reports/{report});
     }

   }
}

它不起作用,响应是:Missing or insufficient permissions.

0 个答案:

没有答案