ACL middleware for koa.
Features
- More smart to adapt koa.
Document
Examples
Setting options.
var ACL = ;var Acl = ;app;
Middleware for users or roles.
var ACL = ;route;
Methods
Acl(options)
Configure options for Acl.
Arguments
optionsuser Function user ID getteroptionsbackend Object|Function backend getter
Acl.middleware(numPathComponents[, userId, actions])
Authorizing by user.
Arguments
numPathComponents Number number of components in the url to be considered part of the resource userId String|Function user actions String|Array lowercase
Tests
npm test