Last active
November 7, 2020 22:45
-
-
Save marcusx2/cb4ec2c43d25ede6e98b12153b03567f to your computer and use it in GitHub Desktop.
firebase rule to allow only read corresponding document by registered user
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 /users/{userEmail} { | |
allow read: if request.auth.token.email.lower() == userEmail.lower(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment