Node Acl Sequelize Backend
Features & Documentation
npm install aclnpm install sequelizenpm install DIALECT #One of the supported Sequelize dialectsnpm install sequelize-acl
Acl = ;Sequelize =AclSeq = ;db = 'DB' 'USER' 'PASSWORD'acl = db prefix: 'acl_' ;
The second parameter sent to the backend constructor can have supports the following options -
prefix - prefix for table names in the database default ''
defaultSchema - Sequlize Schema settings for all buckets with no specific schema default schema has two columns key: Primary STRING, value: STRING
schema - Object with Sequlize Schema settings per bucket (meta|parents|permissions|resources|roles|users ) to override default schema
Creating tables manually
Sequelize-acl will automatically register and sync needed schemes
if for some reason you need to register your own tables and the schema override parameters are not good enough you can register the schemes yourself before instiating the
backend. Sequelize-acl will use the existing schema instead of adding a new one (Register schema should follow
bucket_name convention and have key, value columns)
The test database connection settings are in the
The current setting expect a local
mysql server with passwordless
root account and
See changelog file
This project participates in the Responsible Disclosure Policy program for the Node.js Security Ecosystem. see security.md for more info
- default schema limit each column 255 chars, if you have a lot of resources / permissions / complex hierarchy, You'll probably need to set your own schema with higher limit.
- node ACL has a race condition bug I would avoid setting multiple permissions until the issue is resolved
- I haven't done any performance tweaks, this can probably be implemented in a much more efficient way using relational schema and JOINS, but I'm note sure node ACL API is flexible enough to make it beneficial
P.S Thanks for Robert Kaufmann III firstname.lastname@example.org who originally registered the npm module.