Created
February 15, 2021 21:54
-
-
Save Mazuh/a58e5bd48fdb365fba85b3636e30a383 to your computer and use it in GitHub Desktop.
firestore simple rule
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
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