Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 698 Bytes

README.md

File metadata and controls

33 lines (21 loc) · 698 Bytes

sails-context

Sails.js context loader. This module preload data like current record, list count ... etc for use in others policies, controllers and views as req.context

How it will work? ... a sails acl proposal ...

Link: https://gist.github.com/albertosouza/81bfb2bea761b7b6f5fe

Installation

npm install sails-context --save

Add it to your policies:

// file config/policies.js
var context = require('sails-context').sails.police;

module.exports.policies = {
  '*': [context]
};

Credits

Alberto Souza and contributors

LICENSE: MIT