@nicolasbonnici/acl

0.0.1 • Public • Published

node-acl

Simple ACL middleware for a CRUD access managment

Installation

'npm install @nicolasbonnici/node-acl'

Usage

var acl = require('@nicolasbonnici/node-acl');
acl.check(oUser, sRessource, sAction);

### Permission structure (role attribute on your the first parameter)
"roles" : [

{ "name" : "member", "_id" : "588fb1b84939605bec24ca83", "created" : "2017-01-30T21:35:52.681Z", "permissions" : [ { "entity" : "users", "rights" : { "create" : true, "read" : true, "update" : true, "delete" : true }, "_id" : "588fb1b84939605bec24ca81", "created" : "2017-01-30T21:35:52.680Z" }, { "entity" : "searches", "rights" : { "create" : true, "read" : true, "update" : true, "delete" : true }, "_id" : "588fb1b84939605bec24ca82", "created" : "2017-01-30T21:35:52.680Z" } ] }

Tests

npm test

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Readme

Keywords

Package Sidebar

Install

npm i @nicolasbonnici/acl

Weekly Downloads

0

Version

0.0.1

License

GPL-3.0

Last publish

Collaborators

  • nicolasbonnici