Skip to content

Commit

Permalink
Don't delete user roles
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Buczynski committed Jun 10, 2016
1 parent eb80a3d commit 178ac31
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/user/user.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,8 @@ UserSchema.statics.findByEmailAndPopulate = function(email) {
UserSchema.options.toJSON = {
transform(doc, ret) {

//Delete authentication related data
//Delete sensitive data
delete ret.password;
delete ret.roles;
delete ret.usedTokens;

//Delete unnecessary data
Expand Down

0 comments on commit 178ac31

Please sign in to comment.