-
Notifications
You must be signed in to change notification settings - Fork 984
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
2fa disabling ask password -- Take 2 #6527
Conversation
Remove unused `index` parameter
Allow `username` to be set as an instance variable
Avoid passing the username to constructor simplifying base class
I confirm that the other modals are now working again. |
@yeraydiazdiaz I'd like to ask for the user's password instead of their username when deleting an account. Do you think it's something we could add to this PR? |
Thanks for verifying @nlhkabu. Yes, I can add that as well. |
Add confirm_password_button macro
@nlhkabu I've added confirming the password on account deletion. Here's a capture: |
@di can you review? |
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'm not seeing how we can get rid of index
here -- it's important for distinguishing between multiple of the same form on the same page (i.e., the delete releases page).
@yeraydiazdiaz could you please ensure that the modal content is translatable, e.g. This will ensure we don't revert changes from #6598 Thanks |
@di are we ready to go here? @yeraydiazdiaz since we have now merged the translations PR (see #6598) we will need to rebase this, making sure that all |
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.
LGTM
Amend tests for Confirm controller
A minor nit: after deleting the account, there's no indication that the action was indeed successful. I'm not sure how difficult it might be to add, but that was something I found myself surprized to not see in the GIF above. |
@pradyunsg In the GIF @yeraydiazdiaz is using the incorrect password, so the account doesn't actually delete -- there's a warning, and then the GIF loops. If the password was correct, the user would have been logged out, which is probably indication enough that it was successful. And since the user is logged out, we can't flash a message. The only other thing we could do would be to redirect to a page that is specifically for confirming that account deletion was successful, but I'm not sure that's worth doing. If you do though, please feel free to create an issue! |
Thanks for the quick response @di! Reading your description, I don't think there's any change needed here IMO. :) |
Closes #5825
This PR builds on top of #6408 and fixes the errors reported by @di
The errors originated on the refactor of the modal template code:
name
attribute on theinput
tag was accidentally deleted which caused the all other "confirm" modal forms to fail.index
kwarg was left behind which caused the traceback @di posted.Here's a capture of the reported broken funcionality working with this PR:
I'd appreciate a further round of tests before merging if at all possible.