@sazze/acl

1.0.3 • Public • Published

ACL

Access Control Library

Usage

var acl = require('@sazze/acl')(config);

var levels = acl.LEVELS;

API

acl.is[LevelName](level: Integer): Boolean

Checks if the given level is >= the value corresponding to the LevelName

acl.eq[LevelName](level: Integer): Boolean

Checks if the given level is == the value corresponding to the LevelName

acl.isAtLeast(levelYouHave: Integer, levelYouWant: Integer): Boolean

Checks if the levelYouHave >= the levelYouWant it to be

acl.getAvailableLevels(levelYouHave: Integer): Array

Returns and array of all levels this user has access to

Readme

Keywords

Package Sidebar

Install

npm i @sazze/acl

Weekly Downloads

3

Version

1.0.3

License

ISC

Last publish

Collaborators

  • sazze-inc