-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #3658 - the `validateSchema` helper was a bit broken - if you add a user without email, you will receive a database error - but the validation error should catch that email is passed with null - it was broken, because: - A: it called `toJSON` -> this can remove properties from the output (e.g. password) - B: we only validated fields, which were part of the JSON data (model.hasOwnProperty) - we now differentiate between schema validation for update and insert - fixed one broken import test - if you import a post without a status, it should not error - it falls back to the default value - removed user model `onValidate` - the user model added a custom implementation of `onValidate`, because of a bug which we experienced (see #3638) - with the refactoring this is no longer required - we only validate fields which have changed when updating resources - also, removed extra safe catch when logging in (no longer needed - unit tested) - add lot's of unit tests to proof the code change - always call the base class, except you have a good reason
- Loading branch information
Showing
11 changed files
with
362 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.