Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikordaris/node_acl_arangodb
ArangoDB backend for Node ACL
https://github.com/nikordaris/node_acl_arangodb
Last synced: 11 days ago
JSON representation
ArangoDB backend for Node ACL
- Host: GitHub
- URL: https://github.com/nikordaris/node_acl_arangodb
- Owner: nikordaris
- License: mit
- Created: 2016-02-23T12:39:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-24T09:26:20.000Z (over 8 years ago)
- Last Synced: 2024-10-19T11:28:25.153Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
#NODE ACL - ArangoDB backend
This fork adds ArangoDB backend support to [NODE ACL](https://github.com/OptimalBits/node_acl)##Status
[![license - MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![BuildStatus](https://secure.travis-ci.org/nharris85/node_acl_arangodb.png?branch=master)](http://travis-ci.org/nharris85/node_acl_arangodb)[![NPM status](https://nodei.co/npm/acl-arangodb.png?downloads=true&stars=true)](https://www.npmjs.com/package/acl-arangodb)
[![Dependency Status](https://david-dm.org/nharris85/node_acl_arangodb.svg)](https://david-dm.org/nharris85/node_acl_arangodb)
[![devDependency Status](https://david-dm.org/nharris85/node_acl_arangodb/dev-status.svg)](https://david-dm.org/nharris85/node_acl_arangodb#info=devDependencies)##Installation
Using npm:
```javascript
npm install acl-arangodb
```##Usage
Download and install [ArangoDB](https://www.arangodb.com/)
Start ArangoDB with default configuration.
Create ArangoDB database object in your node.js application.
Create acl module and instantiate it with ArangoDB backend, passing the ArangoDB object into the backend instance.```javascript
// require arangojs
var arangojs = require('arangojs');
// Defaults to localhost and '_system' database. See arangojs documentation for configuration options
var db = arangojs();
// Set the database for your ACL. Note: You must create the database if it doesn't exist already.
db.useDatabase('mydb');// require acl and create ArangoDB backend
var Acl = require('acl-arangodb');
// Doesn't set a 'prefix' for collections and separates buckets into multiple collections.
acl = new Acl(new Acl.arangodbBackend(db));// Alternatively, set a prefix and combined buckets into a single collection
acl = new Acl(new Acl.arangodbBackend(db, 'acl_', true));
```
##Testing
Tested using acl's tests runner against ArangoDB v3.0.3##Documentation
See [NODE ACL documentation](https://github.com/OptimalBits/node_acl#documentation)
See [ArangoDB documentation](https://docs.arangodb.com)