resource-access-list
A simple Loopback ACL middleware with one rule file, also support limited dynamic role supported which base on Loopback model relation method
Inspired by the following libraries/examples:
Install
npm i -S resource-access-list
Usage
const path = const Ral = module { const ral = ralsuperRoles = 'admin' ralnotAllowStatusCode = 403 ral return ralcheck}
Dynamic Role
- for invoke $owner role, need adding 'owner' relationship in the model.json
- for invoke $memeber role, need adding 'member' relationship in the mdoel.json
License
MIT © [chopperlee]