【发布时间】:2021-07-20 17:49:12
【问题描述】:
“允许读取:如果为真”,我的开发站点运行良好。在生产中,我进行了以下更改,这些更改应该允许对公共收藏进行读取访问。我能够下载数据并且我的前端正确呈现,但我在控制台中遇到权限错误。
我使用 flamelink 作为 cms,它确实在某些字段中放置了引用。我是否也需要所有引用集合的读取权限?
service cloud.firestore {
match /databases/{database}/documents {
match /fl_content/{document} {
allow read: if true
}
match /fl_files/{document} {
allow read: if true
}
match /fl_navigation/{document} {
allow read: if true
}
match /{document=**} {
allow read, write: if request.auth.uid != null;
}
}
}
我正在使用这个 Vue 方法接收数据。 数据已收到,我可以访问它。
firestore: {
pageContent: firestore
.collection("fl_content")
.where("_fl_meta_.schema", "==", "aboutPage")
.limit(1),
},
但控制台显示错误
快照侦听器中未捕获的错误:FirebaseError:缺少权限或权限不足。
有什么帮助吗?
【问题讨论】:
标签: firebase vue.js google-cloud-firestore flamelink-cms