hoppscotch/firestore.rules

15 lines
485 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;
}
// Make sure the uid of the requesting user matches name of the user
// 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
}
}
}