Files
lunchrun.me/config/policies.js
2014-06-10 21:21:24 -05:00

46 lines
971 B
JavaScript

/**
* Policy mappings (ACL)
*
* Policies are simply Express middleware functions which run **before** your controllers.
* You can apply one or more policies to a given controller, or protect just one of its actions.
*
* Any policy file (e.g. `authenticated.js`) can be dropped into the `/policies` folder,
* at which point it can be accessed below by its filename, minus the extension, (e.g. `authenticated`)
*
* For more information on policies, check out:
* http://sailsjs.org/#documentation
*/
module.exports.policies = {
'*': false,
StaticPagesController: {
'*': true
},
RunController: {
'*': false,
'find': true,
'create': true
},
InviteeController: {
'*': false,
'find': true,
'create': true,
'update': true
},
SessionController: {
'create': true,
'destroy': 'isAuthenticated'
},
UserController: {
'*': true
}
};