You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my projet sails is not set as global. And there is an error under _loadPolicies.js cause it used
sails.config.paths.policies but sails is undefined. Is there any way to fix this ?
Thanks
The text was updated successfully, but these errors were encountered:
Could you give more information regarding your problem?
All I've done to extend sails policies was to override loadPolicies function, to loop through an array of policies path extended by the plugin, but the core of the function remains pretty much the same, and still references "sails.config.paths.policies" as shown below:
// Original function taken from Sails// sails/lib/hooks/moduleloader/index.js - loadPolicies/** * Load app policies * * @param {Object} options * @param {Function} cb */loadPolicies: function(cb){buildDictionary.optional({dirname: sails.config.paths.policies,filter: /(.+)\.(js|coffee|litcoffee)$/,replaceExpr: null,flattenDirectories: true,keepDirectoryPath: true},bindToSails(cb));},
So you would be getting this error for any load of sails wouldn't you?
Feel free to fork the repository and send a pull request, it would be highly appreciated.
Hi,
In my projet sails is not set as global. And there is an error under _loadPolicies.js cause it used
sails.config.paths.policies but sails is undefined. Is there any way to fix this ?
Thanks
The text was updated successfully, but these errors were encountered: