Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
npm module for entitlements
JavaScript
branch: master
Failed to load latest commit information.
tests another test added
.gitignore travis.yml added
.travis.yml travis.yml added
README.md sample added
entitlement.js async was not really used
package.json preparation of patch 0.1.1 release

README.md

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.

Something went wrong with that request. Please try again.