resource-access-list
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -36,4 +36,2 @@ 'use strict'; | ||
this.memberField = opts.memberField || 'teamId'; | ||
this.userModleName = opts.userModelName || 'user'; | ||
this.memberField = opts.memberField || 'member'; | ||
acl = this; | ||
@@ -98,15 +96,10 @@ } | ||
} else if (ModelInst && ModelInst.member) { | ||
// return models[acl.userModleName].findById(userId) | ||
// .then(userInst => { | ||
if (ModelInst.member) { | ||
ModelInst.member(function (err, member) { | ||
if (err) { | ||
return reject(err); | ||
} else if (Number(memberId) === Number(member.id)) { | ||
roles.push('$member'); | ||
} | ||
return resolve(roles); | ||
}); | ||
} | ||
// }) | ||
ModelInst.member(function (err, member) { | ||
if (err) { | ||
return reject(err); | ||
} else if (Number(memberId) === Number(member.id)) { | ||
roles.push('$member'); | ||
} | ||
return resolve(roles); | ||
}); | ||
} else { | ||
@@ -113,0 +106,0 @@ return resolve(roles); |
{ | ||
"name": "resource-access-list", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "This is a awesome project", | ||
@@ -11,3 +11,3 @@ "main": "dist/index.js", | ||
"postbuild": "npm test -s", | ||
"changelog": "github-changes -o ChopperLee2011 -r resource access list", | ||
"changelog": "github-changes -o ChopperLee2011 -r resource-access-list", | ||
"check": "dependency-check package.json --entry src", | ||
@@ -25,2 +25,6 @@ "prepublish": "npm run build -s", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ChopperLee2011/resource-access-list.git" | ||
}, | ||
"files": [ | ||
@@ -40,6 +44,10 @@ "dist" | ||
"keywords": [ | ||
"yoeman", | ||
"npm", | ||
"es6" | ||
"loopback", | ||
"role-based", | ||
"acl" | ||
], | ||
"engines": { | ||
"node": ">=6.10.0", | ||
"npm": " >=3.10.10" | ||
}, | ||
"devDependencies": { | ||
@@ -46,0 +54,0 @@ "babel-cli": "^6.24.0", |
@@ -5,6 +5,2 @@ # resource-access-list | ||
[![Build Status][travis-image]][travis-url] | ||
[![Coveralls Status][coveralls-image]][coveralls-url] | ||
[![Dependency Status][depstat-image]][depstat-url] | ||
[![Downloads][download-badge]][npm-url] | ||
[![Code Style][standard-image][standard-url]] | ||
@@ -27,3 +23,3 @@ An ACL middleware for Loopback APP, with limit dynamic role supported. | ||
resource-access-list() // true | ||
resourceAccessList() // true | ||
``` | ||
@@ -44,12 +40,2 @@ | ||
[travis-url]: https://travis-ci.org/chopperlee/resource-access-list | ||
[travis-image]: https://img.shields.io/travis/chopperlee/resource-access-list.svg?style=flat-square | ||
[coveralls-url]: https://coveralls.io/r/chopperlee/resource-access-list | ||
[coveralls-image]: https://img.shields.io/coveralls/chopperlee/resource-access-list.svg?style=flat-square | ||
[depstat-url]: https://david-dm.org/chopperlee/resource-access-list | ||
[depstat-image]: https://david-dm.org/chopperlee/resource-access-list.svg?style=flat-square | ||
[download-badge]: http://img.shields.io/npm/dm/resource-access-list.svg?style=flat-square | ||
[standard]: https://img.shields.io/badge/code_style-standard-brightgreen.svg | ||
[travis-image]: https://img.shields.io/travis/chopperlee/resource-access-list.svg?style=flat-square |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
1
10611
183
38