auth-role

Create named collections of permissions.

auth-role

Create named collections of permissions.

npm install auth-role
component install alexmingoia/auth-role
var Permission = require('auth-permission');
var Role = require('auth-role');
 
var role = new Role('member');
 
role
  .allow(Permission('read', 'forum'))
  .allow(Permission('create', 'thread'));

Create a new Role with given name.

Allow given permission.

Return the name of the role.

Return the role's allowed permissions.