page-roles

page-roles ==========

npm install page-roles
3 downloads in the last week
12 downloads in the last month

page-roles

var wall = require('./lib/firewall');

wall.define({
  super: ['admin', 'vip'],
  vip: ['user', 'premium'],
  admin: ['xxx-admin', 'ooo-admin'],
  user: ['gg', 'xd']
});

wall.generateObject();

console.log('admin, super : %s', wall.isAllowed('admin', 'super'));
console.log('vip, user    : %s', wall.isAllowed('vip', 'user'));

console.log(wall.simplify(['admin', 'xxx-admin', 'vip', 'user']));

wall.check(['admin', 'user'], ['vip'], function (allow) {
  console.log(allow); // false
});
npm loves you