Edit Page

sails.config.policies

This configuration is a dictionary that maps policies to an app’s actions. See Concepts > Policies for more info.

Properties

Property Type Default Details
(any string)
_or_
n/a Any properties added to sails.config.policies will be interpreted as a mapping of policies to a controller or a set of standalone actions.

Example

module.exports.policies = {
 '*': 'isLoggedIn', // Require user to be logged in to access any action not otherwise mapped in this config
 'UserController': {
 'login': true // Always allow access to the user login action
 }
}

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 repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.

Check out the official Sails VS Code extension

Documentation

Reference

Sails logo

Reference

AltStyle によって変換されたページ (->オリジナル) /