是否可以向 Firebase Firestore 规则添加评论?

Dja*_*ave 5 firebase firebase-security google-cloud-firestore

我一直无法在文档中找到任何说明您是否可以添加评论的内容,即

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      // Testing the removal of this line:
      // allow read: if true;
      allow read: if false;
      allow write: if request.auth.uid != null;
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

网上有关于规则语法的信息吗?它是用什么语言编写的?

Dou*_*son 10

该语言记录在此处。它被称为 CEL(通用表达式语言)。从您所看到的内容可以很清楚地看出,包含//的行被认为与 C++ 和 Java 一样是从行的点//到尾的注释。