This commit is contained in:
Sacha Greif 2014-09-28 08:46:20 +09:00
parent eeb961d905
commit 8b6e5215fd

View file

@ -48,10 +48,11 @@ Schema.User = new SimpleSchema({
Meteor.users.deny({
update: function(userId, post, fieldNames) {
console.log(fieldNames)
if(isAdminById(userId))
return false;
// deny the update if it contains something other than the profile field
return (_.without(fieldNames, 'profile').length > 0);
return (_.without(fieldNames, 'profile', 'username', 'slug').length > 0);
}
});