你能帮我吗?
我有这些规则
service cloud.firestore {
match /databases/{database}/documents {
match /locations/{document=**} {
allow read, write;
}
match /Users/{userId} {
allow read: if request.auth.uid != null && request.auth.uid == userId;
allow write: if request.auth.uid != null && request.auth.uid == userId;
}
}
}
因此,当我尝试通过Firebase Simulator访问“位置”集合时,出现错误:
模拟数据访问被拒绝
这是截图
模拟器的“位置”字段中的路径为
/databases/(default)/documents/locations
我可以从我的应用程序访问数据并将数据写入到用户集合(当然是在得到授权的情况下),但是问题是我需要在没有任何权限的情况下允许访问位置集合。我看不懂“地点”收藏
任何建议都非常欢迎
您指定的路径不正确。
它应该是唯一的locations/documentID
,而不是databases/(default)/documents/locations/documentID
。
/databases/(default)/documents
基本上是您所在位置的提示。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句