Files
lunchrun.me/config/policies.js
2014-07-04 13:51:27 -05:00

48 lines
1020 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,
'update': true
},
InviteeController: {
'*': false,
'find': true,
'create': true,
'update': true,
'destroy': true
},
SessionController: {
'create': true,
'destroy': 'isAuthenticated'
},
UserController: {
'*': true
}
};