express-user-local-basic
Advanced tools
Comparing version 0.0.1-alpha.2 to 0.0.1-alpha.3
@@ -298,2 +298,13 @@ //Copyright (c) 2015 Eric Vallee <eric_vallee2003@yahoo.ca> | ||
ResponseRoutes['NoAccess'] = function(Err, Req, Res, Next) { | ||
if(Err.Type && Err.Type==="NoAccess") | ||
{ | ||
Res.status(401).end(); | ||
} | ||
else | ||
{ | ||
Next(Err); | ||
} | ||
} | ||
module.exports = function(Options) { | ||
@@ -321,4 +332,3 @@ var Roles = Options && Options.Roles ? Options.Roles : {'Edit': ['Admin'], 'Delete': ['Admin'], 'Get': ['Admin']}; | ||
return function(Router, Roles) { | ||
return function(Router) { | ||
Router.post('/Users', ResponseRoutes.UsersPost(SendEmail)); | ||
@@ -371,2 +381,3 @@ Router.use('/Users', ResponseRoutes['UsersPostErr']); | ||
Router.use('/', ResponseRoutes['InsecureConnectionErr']); | ||
Router.use('/', ResponseRoutes['NoAccess']); | ||
Router.use('/', ResponseRoutes['NotValidatedErr']); | ||
@@ -373,0 +384,0 @@ Router.use('/', ResponseRoutes['NoSessionUser']); |
{ | ||
"name": "express-user-local-basic", | ||
"version": "0.0.1-alpha.2", | ||
"version": "0.0.1-alpha.3", | ||
"description": "Basic response handler for express-user-local.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -11,12 +11,11 @@ Express-User-Local-Basic | ||
Like its sibling projects, this library is in prototype stage at this point. It is untested (beyond basic manual tests) and I'll postpone the writing of automated tests until the API is relatively final. | ||
At this point, the structure is stable. | ||
In particular, only the response logic in express-user has been moved to this library so far. The same will have to be done for express-user-local. | ||
However, I will still label this library as alpha until a good refactoring pass has been done to eliminate redundant code as well as unit tests and more extensive documentation. | ||
More doc to come later. Feel free to look at the example in the express-user-local project for a complete implementation. | ||
0.0.1-alpha.1 | ||
0.0.1-alpha.3 | ||
------------- | ||
Initial prototype | ||
- Updated library to take account new error returned by the version 2.0.0 of express-access-control | ||
- Removed Roles argument from route handling closure as per changes to version 1.0.0 of express-user | ||
@@ -28,1 +27,6 @@ 0.0.1-alpha.2 | ||
- Updated library to handle response feedback from version 0.0.1-alpha.12 of express-user-local | ||
0.0.1-alpha.1 | ||
------------- | ||
Initial prototype |
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
34050
350
31
1