View our GitHub

Please visit sails-docs on GitHub to view documentation on your mobile device.

Edit Page

myApp/api/policies

Purpose

This is the folder you will store your policy files in. A policy file is a .js file that contains what is essentially express middleware for authenticating access to controller actions in your app.

If you want to make sure only the user rick1983 can access http://prism.gov/rick1983 , this is the folder you would put that logic in.

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails-docs repo. Once we merge it, the changes will be immediately reflected on the website.