Skip to content

loopusdev/sails-context

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Sails.js policy for preload context data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%