I'm searching to add a rule in my Firestore database.
The rule is to allow write documents if the document equal the request.auth.uid
.
I don't know how to search the name of my document in the rules.
This is my code where is missing this part :
service cloud.firestore {
match /databases/{database}/documents {
match /users/{anyDocument} {
allow write: if request.auth != null && request.auth.uid == ?????????;
allow read
}
}
}