Firestoreセキュリティルール
firestoreの構成は?
/docs/{userID}/5W1H/docID
var uid = userID
var docid = docID
db.collection(‘docs’).document(uid).collection(‘5W1H’).document(docid)
セキュリティ
service cloud.firestore {
match /databases/{database}/documents {
match /docs/{userID}/5W1H/{document=**} {
allow read, update, delete: if request.auth.uid == userID;
allow create: if request.auth.uid != null;
}
}
}