首页 > 解决方案 > 这可能是firestore错误吗?

问题描述

我尝试了许多不同的规则。但我收到权限错误。

在此处输入图像描述

但是,如果我添加此规则,它会起作用

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

标签: google-cloud-firestorefirebase-securityfirebase-console

解决方案


我注意到了这一点。我遇到了 collectionGroup 函数的问题。

//权限错误

this.fs.collectionGroup('screts', ref => ref.where("uid", "==", uid));

// 没有任何错误。我正在获取数据

this.fs.doc('channels/zs2wJE3uBR62tqslJJe9').collection('screts').doc('scret_fields')

推荐阅读