In order to be called again on the server, this whole autoValue population code block will need to be called again in the deny callbacks. So you'll want to factor it out into a separate function that can be called in both places. More info about using the deny callback for this purpose is here: https://github.com/oortcloud/unofficial-meteor-faq#how-can-i-alter-every-document-before-it-is-added-to-the-database

I think it's best to run it twice for client-initiated inserts, once here and once in the deny callback. That way it would pass client-side validation with basically a dummy value and then get the real value on the server. For example, the `createdAt` would be set on the client in order to pass validation but then would be overwritten when the `autoValue` function is run again on the server, which would give you the more trustworthy date. If a developer wanted to, he could have the `autoValue` function return different values based on `Meteor.isClient`.