Represent a permission having an action and resource.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
.gitignore
README.md
component.json
package.json

README.md

auth-permission

Represent a permission having an action and resource.

Installation

Node

npm install auth-permission

Browser

component install alexmingoia/auth-permission

Example

var Permission = require('auth-permission');

var permission = new Permission('read', 'forum');

API

Permission(action, resource)

Creates a new Permission with given action and resource.

permission.name()

var permission = new Permission('read', 'forum');

permission.name();
// => "read forum"

permission.action()

permission.resource()

MIT Licensed