Firestore
1
// Allow read/write access on all documents to any user signed in to the application
2
service cloud.firestore {
3
match /databases/{database}/documents {
4
match /{document=**} {
5
allow read, write: if request.auth.uid != null;
6
}
7
}
8
}
Copied!
allow read, write: if request.auth.uid != null;
1
service cloud.firestore {
2
match /databases/{database}/documents {
3
// Make sure the uid of the requesting user matches name of the user
4
// document. The wildcard expression {userId} makes the userId variable
5
// available in rules.
6
match /users/{userId} {
7
allow read, update, delete: if request.auth.uid == userId;
8
allow create: if request.auth.uid != null;
9
}
10
}
11
}
Copied!
Last modified 2yr ago
Copy link