Naysayers Promote Misery
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

koa-ssacl

0.0.1 • Public • Published

koa-ssacl

Easily set the ssacl actor from koa

Automatically manages the CLS namespace for ssacl/sequelize allowing you to simply do:

koa.use(function *(next) {
  this.actor = this.request.user.id;
});
 
koa.use(require('koa-ssacl')());

Note if already using sequelize with CLS you need to pass the namespace to koa-ssacl so it won't generate it's own:

koa.use(require('koa-ssacl')({
  cls: namespace
}));

Keywords

install

npm i koa-ssacl

Downloadsweekly downloads

4

version

0.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability