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 task if provider / claimant details match #3236

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Conversation

rjlynch
Copy link
Contributor

@rjlynch rjlynch commented Sep 26, 2024

If the claimant and provider have matching details (name or email) we
want to raise an admin task for ops to check that the claimant isn't
trying to approve their own claim.

@rjlynch rjlynch force-pushed the LUPEYALPHA-637 branch 2 times, most recently from a799267 to 7eeff75 Compare September 26, 2024 15:18
@rjlynch rjlynch added the deploy Deploy a review app for this PR label Sep 27, 2024
@rjlynch rjlynch marked this pull request as ready for review October 30, 2024 13:22
def provider_and_claimant_names_match?
return false unless verified?

provider_first_name&.downcase == claim.first_name.downcase &&
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't checked, just wondering if this doesn't get tripped by leading or trailing spaces?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These names are set in app/forms/journeys/early_years_payment/provider/authenticated/claimant_name_form.rb which uses the NameFormatValidator so should be safe

def provider_and_claimant_emails_match?
return false unless verified?

provider_email&.downcase == claim.email_address.downcase
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

If the claimant and provider have matching details (name or email) we
want to raise an admin task for ops to check that the claimant isn't
trying to approve their own claim.
@rjlynch rjlynch merged commit 2a8cdac into master Nov 8, 2024
14 checks passed
@rjlynch rjlynch deleted the LUPEYALPHA-637 branch November 8, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
business reviewed deploy Deploy a review app for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants