假设我在firestore数据库中有这个结构:
collection[
document: {
x: 'x',
y: 'y'
}
]Run Code Online (Sandbox Code Playgroud)
我有这个firebase规则:
service cloud.firestore {
match /databases/{database}/documents {
match /collection/{document} {
allow read: if true;
}
}
}Run Code Online (Sandbox Code Playgroud)
但是这个规则暴露了document上面的整体collection,我想要做的只是暴露x场,是否可能?谢谢
我在 firestore 中有一个用户集合,它存储了一些我不想向用户透露的用户信息(例如会话 ID)。所以我的问题是,是否可以只允许 firebase 管理员获取文档的某些字段,而如果任何用户通过身份验证,则可以获取其余字段?Firebase 安全规则是否有可能?