小编tha*_*ffe的帖子

firestore规则路径的大小

我试图在 firestore 规则中使用路径的大小,但无法让任何东西起作用,并且在 firestore 文档中找不到有关如何执行此操作的任何参考。

我想使用最后一个集合名称作为规则中的参数,所以尝试了以下方法:

match test/{document=**}
   allow read, write: if document[document.size() - 2] == 'subpath';
Run Code Online (Sandbox Code Playgroud)

但 .size() 似乎不起作用,.length 也不起作用

firebase google-cloud-firestore

6
推荐指数
1
解决办法
571
查看次数

标签 统计

firebase ×1

google-cloud-firestore ×1