New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

crab-rbac

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crab-rbac - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "crab-rbac",
"version": "1.0.1",
"version": "1.0.2",
"description": "A Hierarchical Role Based Access library. Role, not Rule!",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -49,19 +49,20 @@ # crab-rbac

## API
**can(capability: string, ...roles: string[]): boolean**
* **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[]**
* **capabilitiesOf(role: string): string[]**
Returns all the capabilities (also the inherited ones) that a role can perform.
**listRoles(): string[]**
* **listRoles(): string[]**
Returns all the role names loaded by the rbac library.
**init(roles: Role[]): boolean**
* **init(roles: Role[]): boolean**
Initializes the rbac library with the list of roles provided as argument.
**isInitialized(): boolean**
* **isInitialized(): boolean**
Tells if the library has been initialized

@@ -68,0 +69,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc