acl-permissions

Library for handling Access Control List permissions


License
MIT
Install
npm install acl-permissions@0.1.1

Documentation

acl-permissions

Build Status

Library for handling Access Control List permissions

Example usage

import { PermissionList } from 'acl-permissions'

const acl = new PermissionList(
    'allow|users:*name\n' + 'deny|users:password\n' + 'allow|tasks:*'
);

acl.isAllowed('users:username') // => true
acl.isAllowed('users:name') // => true
acl.isAllowed('users:password') // => false
acl.isAllowed('tasks:anything') // => true