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
Custom errors for collection2 #87
Comments
Are you sure it is true that allow/deny can't be defined on the client? Validation should be happening before the insert/update is attempted, and therefore before allow/deny are checked. Can you post a repo that shows the issue clearly? |
let me try to make a repo. it works for you? |
I don't have time to test at the moment, but I usually put allow/deny in common code, and I've never had an issue. But it's possible you have a certain circumstance that is slightly different for some reason. |
i think i made a mistake @aldeed sorry for ringing the alarm. After creating a sample leaderboard app with the same mechanisms in place, it appears the custom errors are working even though my allow / deny are in common code. https://github.com/geekyme/leaderboard-c2-custom-errors appears to be working - http://shawn.meteor.com/ :S I have to try to find out why my own app code is failing to do this. |
OK, if you haven't already set |
Hello,
If I want to throw my own errors, it seems that I need to specify allow / deny rules on the server side only so they do not interfere with simple-schema.
Is this behavior supposed to be correct? I read on http://stackoverflow.com/questions/20375913/where-should-i-put-allow-and-deny-rules-in-meteor-js that there are benefits with placing allow / deny rules on the client side to save on round trips to the server.
The text was updated successfully, but these errors were encountered: