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

2fa disabling ask password -- Take 2 #6527

Merged
merged 35 commits into from
Oct 7, 2019

Conversation

yeraydiazdiaz
Copy link
Contributor

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:

  • The name attribute on the input tag was accidentally deleted which caused the all other "confirm" modal forms to fail.
  • A call with an index kwarg was left behind which caused the traceback @di posted.

Here's a capture of the reported broken funcionality working with this PR:

deleting_releases_fix

I'd appreciate a further round of tests before merging if at all possible.

@yeraydiazdiaz yeraydiazdiaz requested review from di and nlhkabu August 25, 2019 14:24
@nlhkabu
Copy link
Contributor

nlhkabu commented Aug 30, 2019

I confirm that the other modals are now working again.

@nlhkabu
Copy link
Contributor

nlhkabu commented Aug 30, 2019

@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?

@yeraydiazdiaz
Copy link
Contributor Author

Thanks for verifying @nlhkabu. Yes, I can add that as well.

@yeraydiazdiaz
Copy link
Contributor Author

@nlhkabu I've added confirming the password on account deletion. Here's a capture:

delete_account_password

@brainwane
Copy link
Contributor

@di can you review?

Copy link
Member

@di di left a 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).

warehouse/templates/manage/manage_base.html Outdated Show resolved Hide resolved
@nlhkabu
Copy link
Contributor

nlhkabu commented Sep 10, 2019

@yeraydiazdiaz could you please ensure that the modal content is translatable, e.g.
https://github.com/pypa/warehouse/pull/6598/files#diff-fdc9c6c54285180f385c5f8c0609ccc1R111

This will ensure we don't revert changes from #6598

Thanks

@nlhkabu
Copy link
Contributor

nlhkabu commented Sep 15, 2019

@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 {% trans %} blocks remain in place.

Copy link
Member

@di di left a comment

Choose a reason for hiding this comment

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

LGTM

@pradyunsg
Copy link
Contributor

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.

@di
Copy link
Member

di commented Oct 5, 2019

@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!

@pradyunsg
Copy link
Contributor

Thanks for the quick response @di! Reading your description, I don't think there's any change needed here IMO. :)

@di di merged commit cd7f3e0 into pypi:master Oct 7, 2019
@yeraydiazdiaz yeraydiazdiaz deleted the 2fa-disabling-ask-password branch October 8, 2019 09:40
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.

2FA Ask for password not username when disabling 2FA
5 participants