Access Control List module for Node.js with Express middleware support. Version 4.3.0, actively maintained with regular releases. Forked from the original `acl` package to provide modern code infrastructure, Promises-only API, and improved backends for Redis, MongoDB, and in-memory storage. Key differentiators include breaking changes like constructor options objects instead of multiple arguments, default 'acl_' prefix, and full TypeScript type definitions.
npm install acl2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic setup with Redis backend, creating a role 'guest' with permission to view blogs, assigning role to a user, and checking permission.
Update constructor calls: use options object with appropriate keys.
If you relied on no prefix, explicitly set { prefix: '' } in backend options.Replace callback-based code with async/await or .then().
Migrate to acl2 as documented above.
Use require('acl2') instead of import statements.const acl = new ACL(new ACL.memoryBackend());
Check REDIS_URL environment variable or ensure Redis is running locally.
const acl = new ACL(new ACL.mongodbBackend({ client: mongoClient }));Run: npm install acl2