Firebase 如何使用“编写firestore的安全规则”;“价值地图”;询问?

Firebase 如何使用“编写firestore的安全规则”;“价值地图”;询问?,firebase,google-cloud-firestore,firebase-security,Firebase,Google Cloud Firestore,Firebase Security,使用中记录的“值映射”查询方法 如果我有这个: db.collection('posts') .where(`editorUids.${currentUser.uid}`, '==', true) 如果editorUids.x==true,其中x是request.auth.uid,那么将posts集合限制为只允许list,安全规则会是什么样的,提供关于此代码为什么和/或如何回答此问题的附加上下文可提高其长期价值。 match /posts/{post} { allow list: if

使用中记录的“值映射”查询方法

如果我有这个:

db.collection('posts')
  .where(`editorUids.${currentUser.uid}`, '==', true)

如果
editorUids.x==true
,其中
x
request.auth.uid
,那么将
posts
集合限制为只允许
list
,安全规则会是什么样的,提供关于此代码为什么和/或如何回答此问题的附加上下文可提高其长期价值。
match /posts/{post} {
  allow list: if resource.data[request.auth.uid] == true;
}