fix 4323443 [#1977] thanks @toote

This commit is contained in:
Tyler Renelle 2013-12-11 08:54:54 -07:00
parent 4323443dbd
commit 4e9b3f8522

View file

@ -249,7 +249,7 @@ api.getUser = function(req, res, next) {
* Note: custom is for 3rd party apps
*/
acceptablePUTPaths = _.reduce(require('./../models/user').schema.paths, function(m,v,leaf){
if (_.find('tasks achievements filters flags invitations items lastCron party preferences profile stats tags custom'.split(' '), function(root){
var found= _.find('tasks achievements filters flags invitations items lastCron party preferences profile stats tags custom'.split(' '), function(root){
return leaf.indexOf(root) == 0;
});
if (found) m[leaf]=true;