我既无法在Cloud Firestore(Firebase)中接收数据,也无法写入数据。我在基于Ember的应用程序中执行所有操作。
在文件 config / environment.js 中添加了来自“控制台” Firebase的所有数据。
我还更改了测试的访问规则:
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true;
}
}
}
当我尝试检索数据时:
model () {
return this.store.findAll('item')
// or
// return this.store.query('project', { orderBy: 'title' })
}
我遇到错误:
Error while processing route: index – "permission_denied at /items: Client doesn't have permission to access the desired data."
并且:
Error: permission_denied at /items: Client doesn't have permission to access the desired data.
出什么问题了?
答案 0 :(得分:0)
您需要修改firebase规则:
{
"rules": {
".read": "true",
".write": "true"
}
}