当我试图读取子集合时,我被拒绝了权限。 这是我的集合和子集合,我有团队/成员列表 ? rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
//Grants only a user access to its own data
match /users/{userId} {
allow read, write: if request.auth.uid == userId;
}
//Allow reques
我有以下Firestore规则:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users {
match /{userId} {
allow get: if true;
allow list: if isQueryLimitRespected(20);
allow write: if false;
}
match /--stats-- {
我试图设置Cloud安全规则,以便只授予与文档ID匹配的用户的文档访问权限。Firebase身份验证用于验证用户并使用特定于用户的ID命名文档。文档存储在“用户”集合中。
以下是我的规则:
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 !=
第一篇文章,所以任何提示都将不胜感激。我正在尝试使用REST在StructuredQuery中设置一个“StructuredQuery”来作为防火墙。如果不使用orderBy字段,那么注意我的查询也是有用的。
我的查询如下:
var collection = "testing";
var Query = { //body of the http request
"structuredQuery": {
"from": {
"collectionId":collection,