GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - yonjah/node_acl_sequelize: Node Acl Sequelize Backend

BranchesTags
Open more actions menu

Latest commit

 

History

50 Commits
50 Commits

Folders and files

NameName
Last commit message
Last commit date
lib
lib
 
 
test
test
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitignore
.gitignore
 
 
.jshintrc
.jshintrc
 
 
.npmignore
.npmignore
 
 
.travis.yml
.travis.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
security.md
security.md
 
 

Repository files navigation

Node Acl Sequelize Backend

acl-sequelize

npm version Build Status codecov Known Vulnerabilities License

Sequelize is an SQL ORM that supports many sql servers (mysql, mariadb, sqlite, postgres and mssql) OptimalBits/node_acl.

Features & Documentation

For ACL general use please see OptimalBits/node_acl. For Sequelize general use please see Sequelize Docs.

Installation

Using npm:

npm install acl
npm install sequelize
npm install [DIALECT] #One of the supported Sequelize dialects
npm install acl-sequelize

Getting Started

    Acl       = require('acl');
    Sequelize = require('sequelize'),
    AclSeq    = require('acl-sequelize');
    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

ACL-Sequelize 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. ACL-Sequelize 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

Test setup

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.

Running tests

npm test

Changelog

See changelog file

Security issues

This project participates in the Responsible Disclosure Policy program for the Node.js Security Ecosystem. see security.md for more info

Known Issues

  • 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 [email protected] who originally registered the npm module.

About

Node Acl Sequelize Backend

Resources

Readme
MIT license

Security policy

Security policy
Activity

Stars

44 stars

Watchers

1 watching

Forks

20 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.