I want to give a user the right to update a document. But ONLY if the user updates one specific field of this document. All other fields shouldn\'t be changed by this user.<
Since request.resource.data will show the future object after the write - the only way is to check every field using the following:
function notUpdating(field) {
return !(field in request.resource.data)
|| resource.data[field] == request.resource.data[field]
}
allow update: if notUpdating('title') && notUpdating('description')
Make sure you validate that the user doesn't update all of the fields except the field you want him to have access to