直接在 Firebase 控制台中添加的特定用户的 Firestore 安全规则

Firestore Security Rules for specific user that was added in the Firebase console directly

我有这个用户,我直接从 firebase 控制台添加了它,因此,它不在任何 user 集合中。

是否只有这个特定的用户 ID 可以访问 ordersproducts 的集合?

如果只有一个用户,那么您可以使用以下规则将这些集合的读取权限限制为该特定 UID:

match /orders/{orderId} {
  allow read: if request.auth.uid == "firebase_user_id";
}