entitlement

0.1.1 • Public • Published

entitlement(1) -- abstractions around roles rights and entitlements

Build Status

entitlement       = require('entitlement');

entitlement.registerRoles({
	"view" : ['types.read','values.read'],
	"edit" : ['types.read','values.read','types.write','values.write'],
	"admin" : ['types.read','values.read']
});

entitlement.registerAccounts({
	"someone@somewhere.com" : ['view'],
	"mike@somewhere.com" : ['admin']
});

entitlement.accountHasEntitlement('mike@somewhere.com','types.read') // True
entitlement.accountHasEntitlement('someone@somewhere.com','types.write') // False

Legal Stuff

"entitlement" is owned by Markus Felten. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.

"Node.js" and "node" are trademarks owned by Joyent, Inc.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    3
  • 0.1.0
    3

Package Sidebar

Install

npm i entitlement

Weekly Downloads

2

Version

0.1.1

License

none

Last publish

Collaborators

  • arlac77