Accessing user
that doesn't exist results in Firestore rule error
#155
Labels
bug
Something isn't working
user
that doesn't exist results in Firestore rule error
#155
Problem
Steps to reproduce
getDoc(doc(db, "users", "invalid-user-id"))
Firestore's Emulator shows the error happens on line allow 117, but I suppose it's caused by
resorce.data.organization
read on line 119isOwnerOrClinicianOf
.Solution
Accessing
user
that doesn't exist should result with document not found instead of rules error. This allows clients to differentiate between wrong access and plain 404s.Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: