Created
July 17, 2021 07:56
-
-
Save muthuishere/a5d3776d9f23eac4172624b85a2980d7 to your computer and use it in GitHub Desktop.
Firestore Tweaks
This file contains hidden or 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 /users/{userId}/{document=**} { | |
allow create: if request.auth != null; | |
allow read, update, delete: if request.auth.uid == userId; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The above script will restrict user to allow only data to belong to them in firestore