【问题标题】:Could this be the firestore bug?这可能是firestore错误吗?
【发布时间】:2021-08-29 05:59:42
【问题描述】:

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

但如果我添加这条规则,它会起作用

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

【问题讨论】:

  • 您分享的截图和/或规则有什么问题?
  • 我写的规则不起作用。规则没有问题。测试结果为“成功”。但我无法获取数据。我收到权限错误。
  • 我想我终于找到了解决办法。感谢您的宝贵时间firebase.google.com/docs/firestore/security/…
  • 很高兴听到您找到了 Alpay 的原因。请注意,尽管我们无法在这里为您提供帮助,因为您从未显示出现问题的代码。对于未来有关规则的问题,我强烈建议您包含您遇到问题的代码 - 因为我以为您在问为什么游乐场允许在此处阅读。

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


【解决方案1】:

我注意到了这一点。我在使用 collectionGroup 函数时遇到问题。

//权限错误

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

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

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

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-03-28
  • 1970-01-01
相关资源
最近更新 更多