resource-access-list
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -36,2 +36,3 @@ 'use strict'; | ||
this.memberField = opts.memberField || 'teamId'; | ||
this.notAllowStatusCode = opts.notAllowStatusCode || 401; | ||
acl = this; | ||
@@ -116,3 +117,3 @@ } | ||
if (Object.keys(acl.rules).length === 0) { | ||
return next((0, _httpErrors2.default)(401)); | ||
return next((0, _httpErrors2.default)(acl.notAllowStatusCode)); | ||
} | ||
@@ -186,3 +187,3 @@ if (req && req.user && req.user.roles) { | ||
} else { | ||
return next((0, _httpErrors2.default)(401)); | ||
return next((0, _httpErrors2.default)(acl.notAllowStatusCode)); | ||
} | ||
@@ -193,3 +194,3 @@ }).catch(function (err) { | ||
} else { | ||
return next((0, _httpErrors2.default)(401)); | ||
return next((0, _httpErrors2.default)(acl.notAllowStatusCode)); | ||
} | ||
@@ -196,0 +197,0 @@ } |
{ | ||
"name": "resource-access-list", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "This is a awesome project", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
10732
184