35 lines
866 B
JavaScript
35 lines
866 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 = {
|
|
|
|
// Default policy for all controllers and actions
|
|
// (`true` allows public access)
|
|
'*': false,
|
|
|
|
RunController: {
|
|
'*': false,
|
|
'find': true,
|
|
'create': true
|
|
},
|
|
|
|
InviteeController: {
|
|
'*': false,
|
|
'find': true,
|
|
'create': true,
|
|
'update': true
|
|
}
|
|
|
|
};
|