Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] Use res.forbidden() instead of res.send(403) #3764

Merged
merged 1 commit into from
Jun 20, 2016

Conversation

wulfsolter
Copy link
Contributor

Default behaviour of policy === false || policy === null is to res.send(403).
This bypasses responses/forbidden.js and it's associated view.

@sailsbot
Copy link

Thanks for posting, @wulfsolter! We'll look into this ASAP.

@mikermcneil
Copy link
Member

@wulfsolter Looks good, and makes sense. Only thing to watch out for is that this could cause problems when the policies hook is enabled but the responses hook is not. Probably as simple as a if (_.isFunction(res.forbidden)) {...} check, so I'll go ahead and merge and then check it out. Thanks!

@mikermcneil mikermcneil merged commit 9820037 into balderdashy:master Jun 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants