For the life of me, I cannot understand why the following is resulting in a false
for allowing writes. Assume my users
collection is empty to start
Found this rule to work quite well:
function propChanged(key) {
// Prop changed if key in req but not res, or if key req and res have same value
return (
(key in request.resource.data) && !(key in resource.data)
) || (
(key in request.resource.data) && request.resource.data[key] != resource.data[key]
);
}