我在云端防火墙模拟器中测试时遇到问题。当我有以下规则时,我无法获得“写入”访问权限。
我的收藏品应该是“用户”吗?我的文件是否以某人的用户ID firebase创建?
我的数据库应该如何获得正确的结果?
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, update, delete: if request.auth.uid == userId;
allow create: if request.auth.uid != null;
}
}
}
我认为Cloud Firestore安全规则是正确的。
如果不起作用,那么您应该测试您的Cloud Firestore安全规则。
看到: