accesscontrol-middleware
config your express routes to have role and attribute based access control.
This middleware helps to config express routes to check permission granted with accesscontol.
Installing / Getting started
Install via npm
npm install accesscontrol-middleware --save
Now define roles and grants via accesscontol.
const ac = ;ac // define new or modify existing role. also takes an array. // equivalent to .createOwn('profile', ['*']) // switch to another role without breaking the chain // inherit role capabilities. also takes an array ;
Initialize AccessControlMiddleware
const AccessControlMiddleware = ; const accessControlMiddleware = ac;
config any express route
route;
Tests
npm test