我的意思是,我知道这些是什么,但我对安全规则有点困惑,例如:
service cloud.firestore {
match /databases/{database}/documents {
// This is probably a mistake
match /spaceships { // <= what is this a collection or a document?
allow read;
// In spite of the above line, a user can't read any document wit
我正在尝试创建一个未经身份验证的用户图标‘选择最爱’选项,如果单击一个图标(在ListView of Firestore (图书标题)中的标题列表上),它会保存要路由到新收藏页的数据。我无法在Firestore文档中找到关于top如何做到这一点的信息,但我找到了一个youtube教程,它是为一个流行的颤音WordPair应用程序编写的。下面是用来存储他们的WordPair数据的字符串:
final _randomWordPairs = <WordPair>[];
检查是否已经保存了WordPair列表的另一个变量是:
final _savedWordPairs = Set<W
constructor(props) {
super(props);
this.state = {
users:[]
};
}
//method to get the data from users collection
async componentDidMount() {
const db = firebase.firestore();
db.collection("users")
.get()
.then(querySnapshot => {
const
我有一个Routines集合,其中不允许具有字段programId的文档可读性。
我有一条消防规则:
match /Routines/{routineId=**} {
allow write: if false;
allow read: if !('programId' in resource.data);
}
当我从这个集合中得到一个文档时,规则可以正常工作,但是当我得到整个集合时,我得到了所有的文档,甚至有一个programId集的文档。因此,该规则似乎不适用于集合。
我得到了这样的收藏:
const res = await firebase.firesto