ACL的Firestore安全规则

时间:2019-05-19 17:17:41

标签: google-cloud-firestore firebase-security-rules

有人可以提供此Firestore规则ACL(https://fireship.io/courses/firestore-data-modeling/models-access-control-list/)的帮助吗?我已将所有帖子ID存储在用户docs / posts中的posts数组中,并希望验证每个在用户docs / posts数组中具有post ID的文档。 基本上与此相反:

match /posts/{document} {

   allow read;
   allow write: if resource.data.members.hasAny(request.auth.uid);

}

因此,我不想从用户数组中获取UserId,而是要从用户doc / posts数组中获取ID。

0 个答案:

没有答案
相关问题