LG-11758: Add inline device nickname editing for authenticator apps#9845
LG-11758: Add inline device nickname editing for authenticator apps#9845
Conversation
changelog: User-facing Improvements, MFA, add inline device nickname editing for authenticator apps
| def form_class | ||
| case action_name | ||
| when 'edit', 'update' | ||
| TwoFactorAuthentication::AuthAppUpdateForm | ||
| when 'destroy' | ||
| TwoFactorAuthentication::AuthAppDeleteForm | ||
| end | ||
| end |
There was a problem hiding this comment.
I think this abstraction is more difficult to follow and it would be preferable to explicitly instantiate the form in each of the controllers. It would also allow dropping the set_form alias and before_action.
There was a problem hiding this comment.
With form_class, we use that method to define the form in each controller and the validate_configuration_exists before_action. Wouldn't dropping set_form break the validation before_action?
There was a problem hiding this comment.
Ah, I see what you mean. It would break that, but I think it may be worth splitting it up still and being explicit about that too since this makes it difficult to respond with something other than render_not_found. The existing controller redirects, and I think that might be preferable (perhaps with an error message?).
There was a problem hiding this comment.
After some thought, I will stick to what I am proposing--we are using one view to rename and delete an app method and the form that we need in the view is toggled based on the desired action.
37f4254 to
4ffb39f
Compare
|
failing due to content freeze |
aduth
left a comment
There was a problem hiding this comment.
LGTM 👍 We'll need to wait until after the content freeze to merge.
🎫 Ticket
LG-11758: Add inline device nickname editing for authenticator apps
🛠 Summary of changes
This PR makes it so that users can edit their device nickname or delete an app authenticator in one line.
📜 Testing Plan
Steps require that users have an account with two auth methods set up. This is so that you can easily test the delete and nickname functionality
Edit name
Delete method
👀 Screenshots
If relevant, include a screenshot or screen capture of the changes.
Edit feature
Screen.Recording.2024-01-09.at.10.11.34.AM.mov
Delete feature
Screen.Recording.2024-01-09.at.10.12.22.AM.mov