-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
a799267
to
7eeff75
Compare
def provider_and_claimant_names_match? | ||
return false unless verified? | ||
|
||
provider_first_name&.downcase == claim.first_name.downcase && |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
7eeff75
to
2de95a4
Compare
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.
2de95a4
to
9d843c0
Compare
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.