Last active
March 25, 2021 17:52
-
-
Save kmaida/de3551e5675b6ea57053f6caf03a25bf to your computer and use it in GitHub Desktop.
Firebase Cloud Firestore rules: all users can read, authenticated users can create if they provide a UID, owner can delete, owner can update.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service cloud.firestore { | |
match /databases/{database}/documents { | |
match /<COLLECTION_NAME>/{document=**} { | |
allow read: if true; | |
allow create: if request.auth != null && request.auth.uid == request.resource.data.uid; | |
allow update, delete: if request.auth != null && request.auth.uid == resource.data.uid; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment