Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "crab-rbac", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A Hierarchical Role Based Access library. Role, not Rule!", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -50,11 +50,15 @@ # crab-rbac | ||
**can(capability: string, ...roles: string[]): boolean** | ||
Returns a boolean that states if the required capability can be performed by the role(s) supplied in the arguments. | ||
**capabilitiesOf(role: string): string[]** | ||
Returns all the capabilities (also the inherited ones) that a role can perform. | ||
**listRoles(): string[]** | ||
Returns all the role names loaded by the rbac library. | ||
**init(roles: Role[]): boolean** | ||
Initializes the rbac library with the list of roles provided as argument. | ||
@@ -61,0 +65,0 @@ |
8341
78