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

Added email verification while creating user and sending email #1208

Merged
merged 4 commits into from
Oct 15, 2020
Merged

Added email verification while creating user and sending email #1208

merged 4 commits into from
Oct 15, 2020

Conversation

pc9795
Copy link
Contributor

@pc9795 pc9795 commented Oct 14, 2020

Description

Added email verification during User creation by adding Java validation API @Email annotation on the email field of the User object. Updated the email verification logic in the EmailSender using Apache commons validator's EmailValidator

Fixes #627

Type of change

  • Bugfix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Locally using Postman

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@pc9795
Copy link
Contributor Author

pc9795 commented Oct 14, 2020

Right now we will get a generic message "Bad Request: Validation failure" while creating User from the API but after merging #1084 we will get a nicely formatted message specifically telling what is failed.

@pc9795
Copy link
Contributor Author

pc9795 commented Oct 14, 2020

FYI: @Nikhil-Nandagopal

@mohanarpit mohanarpit self-requested a review October 15, 2020 03:26
@mohanarpit
Copy link
Member

@pc9795 Thanks for this PR. Is it possible to write a test to assert the email validation is happening properly? Will ensure that in the future, if any other developer changes the validation, the tests can ensure that the change is valid.

@mohanarpit mohanarpit merged commit 05380a9 into appsmithorg:release Oct 15, 2020
@mohanarpit
Copy link
Member

@pc9795 Thank you so much for this change! 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] No server side validation for email and password length + wrong email regex for email notifications
2 participants