express-user
Advanced tools
Comparing version 0.0.1-alpha.12 to 0.0.1-alpha.13
@@ -230,9 +230,12 @@ //Copyright (c) 2015 Eric Vallee <eric_vallee2003@yahoo.ca> | ||
var Roles = Options && Options.Roles ? Options.Roles : {'Edit': ['Admin'], 'Delete': ['Admin'], 'Get': ['Admin']}; | ||
var HidePassword = Options && Options.HidePassword ? Options.HidePassword : true; | ||
var GetSerializer = Options && Options.GetSerializer ? Options.GetSerializer : function(Req, Res, Next, User) { | ||
if(HidePassword) | ||
{ | ||
delete User['Password']; | ||
} | ||
Res.status(200).json(User); | ||
GetRoutingVars(Req, Res, Next, function(RoutingVars) { | ||
if(RoutingVars.Hide) | ||
{ | ||
RoutingVars.Hide.forEach(function(Field, Index, List) { | ||
delete User[Field]; | ||
}); | ||
} | ||
Res.status(200).json(User); | ||
}); | ||
}; | ||
@@ -239,0 +242,0 @@ var CountSerializer = Options && Options.CountSerializer ? Options.CountSerializer : function(Req, Res, Next, Count) { |
{ | ||
"name": "express-user", | ||
"version": "0.0.1-alpha.12", | ||
"version": "0.0.1-alpha.13", | ||
"description": "Ressource Oriented Express Middleware to Manage Users.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -256,1 +256,6 @@ Express-User | ||
- Added support for membership manipulation routes | ||
0.0.1-alpha.13 | ||
-------------- | ||
- Moved the responsability to manage which fields are hidden for 'GET' requests to the validator. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70913
323
261