Merge pull request #1851 from gausie/patch-4

Hide verificationToken from JSON output
This commit is contained in:
Miroslav Bajtoš 2016-01-25 14:23:52 +01:00
commit 0ad150cb6e
2 changed files with 7 additions and 1 deletions

View File

@ -32,7 +32,7 @@
"options": {
"caseSensitiveEmail": true
},
"hidden": ["password"],
"hidden": ["password", "verificationToken"],
"acls": [
{
"principalType": "ROLE",

View File

@ -1320,6 +1320,12 @@ describe('User', function() {
});
});
it('should hide verification tokens from user JSON', function(done) {
var user = new User({email: 'bar@bat.com', password: 'bar', verificationToken: 'a-token' });
var data = user.toJSON();
assert(!('verificationToken' in data));
done();
});
});
describe('User.confirm(options, fn)', function() {