AccessControl is a Node.js library that provides a flexible Role and Attribute based Access Control system combining RBAC and ABAC models for fine-grained authorization.
Role and Attribute based Access Control for Node.js
This tool is designed for developers building authentication and authorization systems in Node.js applications who need to enforce complex access control policies based on user roles and resource attributes. It is ideal for managing permissions in applications where access decisions depend on both roles and dynamic attributes of resources or actions.
This library is written in TypeScript and actively maintained. It is recommended to review the API documentation for advanced usage and to understand how to define complex grants. Users should ensure proper locking of grants in production to avoid accidental permission changes.
Run `npm install accesscontrol` to add the library to your Node.js project
ac.can(role).create(resource)
Checks if the specified role has permission to create the given resource