google-cloud-firestore - 如何为不同的集合设置不同的规则
解决方案
据我所知,您要求:
service cloud.firestore {
match /databases/{database}/documents {
match /Language/{document} {
allow read: if true;
}
match /Users/{document} {
allow read: if request.auth != null;
}
}
}
有了上述任何用户(无论他们的身份验证状态)都可以读取Language
集合,但只有经过身份验证的用户才能读取Users
集合。
推荐阅读
- android - androidx.test.espresso.NoActivityResumedException:RESUMED 阶段没有活动。您忘记启动活动了吗?
- xml - XSLT 从 XML 中删除 XML 版本行
- json - '结果类型的值
'没有成员'值' JSON - javascript - AJAX 请求未打印到控制台,但响应出现在网络日志中
- android - 不兼容的 Kotlin/Native 库
- haskell - 函数与输入数据类型不一致
- python - Twitter API错误charmap'编解码器无法编码位置字符
- javascript - 获取动态创建元素的 id 和 value
- asp.net-core-mvc - Azure AD B2C 和 Microsoft Identity Web - 使用多个策略登录 (.net Core 3.1)
- python - 从 .evo 文件/电影中提取帧