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 and Country Blacklisting #105

Merged
merged 4 commits into from
Mar 12, 2024

Conversation

elmiomar
Copy link
Contributor

Overview

This PR introduces functionality to automatically reject record creation requests in the createRecord() method when the user's email or country is blacklisted.

Changes

  • Implemented new isEmailBlacklisted() and isCountryBlacklisted() methods to check if the user's email or country is in the blacklist.
  • Blacklist validation is the first thing we do in createRecord(). This ensures that requests with blacklisted emails or countries are rejected right away, which prevents unnecessary processing and resource utilization on entries that will ultimately be automatically rejected.
  • Added logging to record when a request is rejected due to blacklisting.
  • Updated unit tests to cover scenarios where the email or country is blacklisted.

Testing

  • Updated existing unit tests to cover the new blacklisting checks.
  • e2e testing with oar-docker to ensure that blacklisted emails and countries are correctly identified and rejected.

Please review the changes and provide your feedback.

@elmiomar elmiomar requested a review from RayPlante February 16, 2024 10:49
@RayPlante RayPlante merged commit 432b784 into integration Mar 12, 2024
2 checks passed
@RayPlante
Copy link
Collaborator

Note: this was not merge directly, but rather indirectly via #106

@RayPlante RayPlante deleted the feature/email-country-blacklists branch March 12, 2024 19:43
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.

2 participants