官术网_书友最值得收藏!

Security rules

Before creating a database and collection in Cloud Firestore, it prompts you to apply the security rules for our database.

Take a look at the following screenshot:

Here are some code example of Firestore rules:

Public:
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write;
}
}
}
Users:
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, write: if request.auth.uid == userId;
}
}
}
Private:
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if false;
}
}
}
主站蜘蛛池模板: 锦州市| 高要市| 东方市| 两当县| 昭平县| 平原县| 吴江市| 独山县| 富裕县| 余江县| 祁东县| 砚山县| 鄯善县| 怀安县| 肥西县| 梧州市| 黄大仙区| 锡林郭勒盟| 天水市| 朔州市| 岑溪市| 洪湖市| 固始县| 河源市| 保康县| 双峰县| 安化县| 剑阁县| 柳江县| 资溪县| 区。| 太白县| 新邵县| 曲沃县| 阿合奇县| 西和县| 禹城市| 额尔古纳市| 宜宾市| 吉木乃县| 涟水县|