Skip to content

Instantly share code, notes, and snippets.

@Mazuh
Created February 15, 2021 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mazuh/a58e5bd48fdb365fba85b3636e30a383 to your computer and use it in GitHub Desktop.
Save Mazuh/a58e5bd48fdb365fba85b3636e30a383 to your computer and use it in GitHub Desktop.
firestore simple rule
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, delete:
if request.auth != null && request.auth.uid == resource.data.userUid;
allow create, update:
if request.auth != null && request.auth.uid == request.resource.data.userUid;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment