Good article Kushagra, only one small problem. If you run your code in the firestore rule playground it will fail for fields that cannot be updated but don't exist in the document yet. The following will fix that:
function notUpdating(field)
{
return !(field in request.resource.data) || (field in resource.data && resource.data[field] == request.resource.data[field]);
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Good article Kushagra, only one small problem. If you run your code in the firestore rule playground it will fail for fields that cannot be updated but don't exist in the document yet. The following will fix that: