E12 team request ability to remove 2FA devices for users in the UI rather than the admin.
Involved abstracting the user activity summary into a separate partial and rendering above the activity table.
Deprecated the duplicate logs_list endpoint
Used the two_factor dependency functions to identify user devices and list them in the new partial, with a button to delete.
In the process I identified a bug in the updated_by/created_by user middleware and fixed it
Code changes
remove unused logs_list from urls.py and user_management_views.py
implement devices_for_user and user_has_device in the logs endpoint to delete selected device on button click
create new partial template logs_user_summary.html and place above user activity table
fix underscore in middleware
update epilepsy_12_user_form.py to update VisitActivity on password reset
Overview
E12 team request ability to remove 2FA devices for users in the UI rather than the admin.
Involved abstracting the user activity summary into a separate partial and rendering above the activity table. Deprecated the duplicate logs_list endpoint
Used the two_factor dependency functions to identify user devices and list them in the new partial, with a button to delete.
In the process I identified a bug in the updated_by/created_by user middleware and fixed it
Code changes
logs_list
fromurls.py
anduser_management_views.py
devices_for_user
anduser_has_device
in the logs endpoint to delete selected device on button clicklogs_user_summary.html
and place above user activity tableepilepsy_12_user_form.py
to update VisitActivity on password resetRelated Issues
closes #905