This repository was archived by the owner on Jul 30, 2022. It is now read-only.

Description
Hello,
I've found that sails-policies aren't called when using swagger-sails.
Minimum example to reproduce:
swagger project create hello-world
Change line in config/policies.js from
to
This will actually break startup, because now sails is looking for a policy that does not yet exist. Now, create the file api/policies/testpolicy.js:
module.exports = function( req, res, next ) {
sails.log( "IN TEST POLICY" );
};
The application will now start up again:
But the policy is not called when accessing the default controller via "localhost:10010/hello"! Is this the expected behaviour? Is there another way of implementing policy-like semantics with swagger-node?