Node Acl Sequelize Backend
npm install sequelize-acljavascript
npm install acl
npm install sequelize
npm install [DIALECT] #One of the supported Sequelize dialects
npm install sequelize-acl
`
Getting Started
`javascript
Acl = require('acl');
Sequelize = require('sequelize'),
AclSeq = require('sequelize-acl');
db = new Sequelize( 'DB', 'USER', 'PASSWORD'),
acl = new Acl(new AclSeq(db, { prefix: 'acl_' }));
`
Extra Options
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 prefix+bucket_name convention and have key, value columns)
Testing
$3
The test database connection settings are in the test/runner.js.
The current setting expect a local mysql server with passwordless root account and test database.
$3
`javascript
npm test
``