Overview of AccessControl features
masterAccessControl is a Role and Attribute Based Access Control (RBAC + ABAC) engine for Node.js. It provides a chainable API to manage complex permissions through several key mechanisms:
- RBAC + ABAC: Supports hierarchical role inheritance with a
deny-overridesmodel, combined with attribute-based rules. - Ownership & Groups: Use the
ownpermission to verify record ownership (configured viaownerFieldorowner). Supports granting access togroupsandcategoriesfor bounded bulk access. - Custom Actions & Gates: Extend beyond standard CRUD using
.action()or.do(). Implement mandatoryrequire()gates to restrict access. - Conditionals & Async Checks: Attach logic via
.where()using comparisons,in,cidr, or time windows. UsegrantedAsyncfor custom or asynchronous logic resolution. - Security & Reliability: Uses
tryCan()to prevent throwing errors, protects against prototype pollution, and provides redacted errors viaerr.code. - Auditing: Emits an
accessevent for every decision (both granted and denied) including areason, along withchangeanderrorhooks.