hoppscotch/firestore.rules

15 lines
489 B
Plaintext
Raw Normal View History

2019-10-03 09:46:39 +00:00
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
2020-01-23 02:32:34 +00:00
allow read, write: if request.auth.uid != null;
}
2021-04-23 11:38:56 +00:00
// Make sure the uid of the requesting user matches the name of the user
2020-01-23 02:32:34 +00:00
// document. The wildcard expression {userId} makes the userId variable
// available in rules.
match /users/{userId} {
allow read, update, delete: if request.auth.uid == userId;
allow create: if request.auth.uid != null;
2019-10-03 09:46:39 +00:00
}
}
}