Methods
authorize(verbs, noun)
Authorizes this role to perform an array of actions on a verb
Parameters:
Name | Type | Description |
---|---|---|
verbs |
Array.<String> | String | Either an array of verbs already regestered with the noun, or |
noun |
String |
- Source:
- See:
Example
someRole.authorize(['create','read'], 'kitten');
can(verb, noun) → {boolean}
Checks if a given noun can perform a given verb
Parameters:
Name | Type | Description |
---|---|---|
verb |
string | |
noun |
string |
Returns:
- Type
- boolean
Example
someRole.can('eat','brick'); // -> true