sails.config.policies
This configuration is a dictionary that maps policies to an app’s actions. See Concepts > Policies for more info.
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. |
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
}
}