Socket
Book a DemoInstallSign in
Socket

@nicolasbonnici/acl

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nicolasbonnici/acl

Simple ACL middleware for a rest API

0.0.1
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

acl

FAQs

Package last updated on 28 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.