适用于App Store上现有应用程序的Firebase安全规则

时间:2020-02-14 21:39:44

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

我有一个应用程序,其中我编写的查询没有任何过滤器,并且仅基于集合名称。

示例:

Firestore.firestore()
    .collection(COLLECTION_WALL)
    .document(DOCUMENT_ID)
    .collection(SUB_COLLECTION_POSTS)

在我的第一个集合( COLLECTION_WALL )中,我有一个数组字段“ MEMBERS ”,其中包含 AUTH.IDs 作为成员的列表 现在,我想从 SUB_COLLECTION_POSTS

中获取所有 DOCUMENTS

我要添加以下安全规则,

allow read, write: if request.auth.uid in COLLECTION_WALL.data.members;

请帮助我实现我的需要。我的应用程序位于App Store上,我不想给现有用户造成麻烦。

0 个答案:

没有答案