{"action":"created","issue":{"url":"https://api.github.com/repos/apigee-127/swagger-sails/issues/1","labels_url":"https://api.github.com/repos/apigee-127/swagger-sails/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/apigee-127/swagger-sails/issues/1/comments","events_url":"https://api.github.com/repos/apigee-127/swagger-sails/issues/1/events","html_url":"https://github.com/apigee-127/swagger-sails/issues/1","id":90893822,"number":1,"title":"Sails.js policy handling?","user":{"login":"DeX3","id":439587,"avatar_url":"https://avatars.githubusercontent.com/u/439587?v=3","gravatar_id":"","url":"https://api.github.com/users/DeX3","html_url":"https://github.com/DeX3","followers_url":"https://api.github.com/users/DeX3/followers","following_url":"https://api.github.com/users/DeX3/following{/other_user}","gists_url":"https://api.github.com/users/DeX3/gists{/gist_id}","starred_url":"https://api.github.com/users/DeX3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeX3/subscriptions","organizations_url":"https://api.github.com/users/DeX3/orgs","repos_url":"https://api.github.com/users/DeX3/repos","events_url":"https://api.github.com/users/DeX3/events{/privacy}","received_events_url":"https://api.github.com/users/DeX3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-25T08:25:58Z","updated_at":"2015-06-26T19:49:29Z","closed_at":null,"body":"Hello,\r\n\r\nI've found that sails-policies aren't called when using swagger-sails.\r\n\r\nMinimum example to reproduce:\r\n\r\n    swagger project create hello-world\r\n\r\nChange line in `config/policies.js` from\r\n\r\n    // '*': true,\r\n\r\nto\r\n\r\n    '*': \"testpolicy\"\r\n\r\nThis 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`:\r\n\r\n    module.exports = function( req, res, next ) {\r\n        sails.log( \"IN TEST POLICY\" );    \r\n    };\r\n\r\nThe application will now start up again:\r\n\r\n    swagger project start\r\n\r\nBut 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`?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apigee-127/swagger-sails/issues/comments/115853112","html_url":"https://github.com/apigee-127/swagger-sails/issues/1#issuecomment-115853112","issue_url":"https://api.github.com/repos/apigee-127/swagger-sails/issues/1","id":115853112,"user":{"login":"theganyo","id":772731,"avatar_url":"https://avatars.githubusercontent.com/u/772731?v=3","gravatar_id":"","url":"https://api.github.com/users/theganyo","html_url":"https://github.com/theganyo","followers_url":"https://api.github.com/users/theganyo/followers","following_url":"https://api.github.com/users/theganyo/following{/other_user}","gists_url":"https://api.github.com/users/theganyo/gists{/gist_id}","starred_url":"https://api.github.com/users/theganyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theganyo/subscriptions","organizations_url":"https://api.github.com/users/theganyo/orgs","repos_url":"https://api.github.com/users/theganyo/repos","events_url":"https://api.github.com/users/theganyo/events{/privacy}","received_events_url":"https://api.github.com/users/theganyo/received_events","type":"User","site_admin":false},"created_at":"2015-06-26T19:49:29Z","updated_at":"2015-06-26T19:49:29Z","body":"If there's a better way to handle this, please let us know or offer a PR. We want this to be a proper integration for Sails folks!"}}