小编Rud*_*udi的帖子

允许根据文档中的时间戳值读取FireStore规则

我想创建一个FireStore规则,在当前日期超过文档中的时间戳值后,将读取特权文件读取到文档.

这适用于博客Web应用程序.EG博主设置了一个博客文章,以便在特定日期向公众开放.

从阅读文档这应该工作,但它没有.

service cloud.firestore {
  match /databases/{database}/documents {
    match /Articles/{article}{
   allow read: if request.time.date() < resource.data.date
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

firebase firebase-security google-cloud-firestore

5
推荐指数
3
解决办法
1840
查看次数