Roles and permissions system for Nodejs

ACL / Roles + Permissions Simple and elegant, create your own checks. No middleware? Use as middleware, create your own roles and access. Great choice. Similar to connect roles… but a bit more robust? you can create roles and action, and associate many roles with that action Like canCan for rails. This is a traditional controller / function type permission system. May be too abstract. More traditional setRole() hasRole() based checking. Last activity 2 years ago. Natural language style roles. Looks very promising and is in active development Simple and closer to action / natural language based. Requires writing your own checks for each. Maybe too simple? Makes sense for assigning roles but then its hard to check against roles! Not ideal but here for reference sake.

Mongoose Field Access Control Set access per field of mongoose Schema. Not supported or maintained, and noted as not a perfect fit in all cases… but worth considering as a simple way to control access to fields.

How to install express on Ubuntu 12.04

Express is a node.js web application framework. Before installing express we need to install node.js and npm (Node Packaged Modules).

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:chris-lea/node.js
$ sudo apt-get update
$ sudo apt-get install nodejs npm
$ node -v

Express is a node.js module, so we can:

$ sudo npm install -g express-generator

To check that express is already installed:

$ npm ls