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

Add email address identity type #3354

Merged
merged 16 commits into from
May 18, 2023

Conversation

shreyamalviya
Copy link
Contributor

What does this PR do?

Fixes #3270

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?
  • Have you checked that you haven't introduced any duplicate code?

Testing Checklist

  • Added relevant unit tests?
  • Do all unit tests pass?
  • Do all end-to-end tests pass?
  • Any other testing performed?

    Tested configuration manually

  • If applicable, add screenshots or log transcripts of the feature working

image

const emptyRegex = /^$/

const emailAddressRegex = new RegExp(/^[\S\-.]+@([\w-]+\.)+[\w-]{2,4}$/)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not totally sure about this. What all do we want to accept?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, here's the regex from the RFC http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seriously though, is there a library that does this validation? Maybe @ordabach can help?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Going with this.

Copy link
Collaborator

@mssalvatore mssalvatore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to check for any code that assumes Username is the only identity.

@shreyamalviya shreyamalviya force-pushed the 3270-add-email-address-identity-type branch from fdbd013 to 5573380 Compare May 17, 2023 13:42
Copy link
Collaborator

@mssalvatore mssalvatore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, pending an ETE test with email addresses to make sure we didn't introduce any issues.

@shreyamalviya shreyamalviya force-pushed the 3270-add-email-address-identity-type branch from 924134b to 14727c5 Compare May 17, 2023 14:00
@mssalvatore
Copy link
Collaborator

ETE tests fail because flask dependencies were upgraded in Pipfile.lock. Flask v2.3.0 removes JSONEncoder. We'll need to pin the flask version and try to run ETE tests again.

@shreyamalviya shreyamalviya force-pushed the 3270-add-email-address-identity-type branch 2 times, most recently from ba63e75 to 6814a04 Compare May 18, 2023 10:33
@shreyamalviya
Copy link
Contributor Author

ETE tests fail because flask dependencies were upgraded in Pipfile.lock. Flask v2.3.0 removes JSONEncoder. We'll need to pin the flask version and try to run ETE tests again.

All tests except SNMP pass.

@mssalvatore mssalvatore force-pushed the 3270-add-email-address-identity-type branch from 6814a04 to b6143f1 Compare May 18, 2023 11:53
@mssalvatore mssalvatore merged commit 2f0ba04 into develop May 18, 2023
@mssalvatore mssalvatore deleted the 3270-add-email-address-identity-type branch May 18, 2023 11:53
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.

Add support for email address identity type
3 participants