-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix double phone vote #36
Fix double phone vote #36
Conversation
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 ran it, works 🎉
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.
Hello, just a change request
@@ -13,6 +13,8 @@ def call | |||
return broadcast(:invalid) unless @form.valid? | |||
|
|||
if @form.auth_method == "sms" | |||
return broadcast(:invalid, "non disponible") if registered_user_with_same_phone_and_country? |
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.
return broadcast(:invalid, "non disponible") if registered_user_with_same_phone_and_country? | |
return broadcast(:invalid, :already_exist) if registered_user_with_same_phone_and_country? |
Prefer to use symbol rather than french translation
@@ -41,7 +41,9 @@ def verification | |||
end | |||
|
|||
on(:invalid) do |error_code| | |||
flash.now[:alert] = if error_code | |||
flash.now[:alert] = if error_code == "non disponible" |
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.
flash.now[:alert] = if error_code == "non disponible" | |
flash.now[:alert] = if error_code == :already_exist |
…/decidim-module-half_sign_up into fix/double_phone_vote
ff58323
into
feature/half_signup_and_budgets_booth
Problem:
If i create an account with no phone number, I can the vote and enter a phone number that already belongs to another account, and vote twice with the same phone number
Related Issues:
Notion card => https://www.notion.so/opensourcepolitics/bd4bf860eab94f9daca7da803f09e3b2?v=c96df65755dd403d95e86f82d7749709&p=39467ef809e94526bf88fee4516f89f3&pm=c
Testing:
If you have time, you can also check that those paths still work well:
Tasks:
Add specs