-
Notifications
You must be signed in to change notification settings - Fork 43
Description
I don't understand how to reload policies. sails.hooks.policies.initialize(cb) will duplicate policies instead of replacing them.
router.flush() does not seems to help.
I posted a message on gitter:
Hi sails team, I'm experiencing issues in sails-hook-autoreload and another hook with sails@1. I want to reload policies / edit policies w/ the hook. In sails 0.12 it was very easy but now I don't understand how to do that.
If I simple do sails.hooks.policies.initialize(), policies get duplicated in sails@1.
If I edit the sails.config.policies array nothing happens when I hit the route. I think that policies are directly binded in the router but even a router.flush does not work.
How should I do to fully reload policies without relifting the server ? Thanks