cansecurity
Advanced tools
Comparing version 0.4.6 to 0.4.7
@@ -17,3 +17,3 @@ /*jslint node:true, nomen:false */ | ||
var isSelf = false; | ||
if (req[csauth][fields.id] === req.params[params.id]) { | ||
if (req[csauth][fields.id] === req.param(params.id)) { | ||
isSelf = true; | ||
@@ -104,6 +104,4 @@ next(); | ||
restrictToRoles : function(roles) { | ||
var userRoles; | ||
roles = roles ? [].concat(roles) : []; | ||
return function(req,res,next) { | ||
var allowed = false, i, userRoles; | ||
if (checkLoggedIn(req,res,next)) { | ||
@@ -120,3 +118,2 @@ if (!checkUserRoles(req,res,next,roles)) { | ||
return function(req,res,next) { | ||
var allowed = false, i, userRoles; | ||
if (checkLoggedIn(req,res,next)) { | ||
@@ -134,3 +131,2 @@ if (!checkSelf(req,res,next)) { | ||
return function(req,res,next) { | ||
var allowed = false, i, userRoles; | ||
if (checkLoggedIn(req,res,next)) { | ||
@@ -150,3 +146,2 @@ if (!checkParam(req,res,next,param)) { | ||
// valid if the user name is the same as the param name, or the logged in user is an admin | ||
var allowed = false, i, userRoles, id, valid = false; | ||
if (checkLoggedIn(req,res,next)) { | ||
@@ -153,0 +148,0 @@ if (!checkUserRoles(req,res,next,roles)) { |
{ | ||
"name": "cansecurity", | ||
"description": "Authentication, authorization, session manager, single-sign-on (SSO) and security framework for node applications", | ||
"version": "0.4.6", | ||
"version": "0.4.7", | ||
"url": "http://github.com/deitch/cansecurity", | ||
@@ -6,0 +6,0 @@ "author": "Avi Deitcher <avi@deitcher.net>", |
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
72982
1231