Skip to content

Instantly share code, notes, and snippets.

@marshyon
Last active August 24, 2022 18:22
Show Gist options
  • Save marshyon/d098baed5b83468e0d09d2919ce0cf28 to your computer and use it in GitHub Desktop.
Save marshyon/d098baed5b83468e0d09d2919ce0cf28 to your computer and use it in GitHub Desktop.
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{uid} {
allow read: if request.auth.uid == uid;
match /checkout_sessions/{id} {
allow read, write: if request.auth.uid == uid;
}
match /subscriptions/{id} {
allow read: if request.auth.uid == uid;
}
match /payments/{id} {
allow read: if request.auth.uid == uid;
}
}
match /products/{id} {
allow read: if true;
match /prices/{id} {
allow read: if true;
}
match /tax_rates/{id} {
allow read: if true;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment