rcpch / national-paediatric-diabetes-audit

A django application to audit the care of children and young people with diabetes in England and Wales.
0 stars 1 forks source link

Eatyourpeas/two-factor-auth-resend-email #39

Closed eatyourpeas closed 4 months ago

eatyourpeas commented 4 months ago

Overview

When a user has been created but they do not create a password within 72 hours, admin users need to be able to resend a fresh token Also, previously created accounts did not have OTP enforced

This PR has two changes:

  1. conditionals to the RCPCHLoginView and the Home url to redirect to two_factor:profile if user is not verified
  2. Add a new button to the create user form, visible only on update user views and if the user in question has not confirmed their email. Separate logic then identifies this on button click in the post request in the view to resend the email and add a success message.

Code changes

changes to: otp_required mostly styling password_reset_confirm - mostly styling npda_user_form.html: add new button and on click event urls.py: remove old LoginView home.py: conditional to redirect to OTP profile if user not validated documentation updates on workflow

Documentation changes (done or required as a result of this PR)

Please describe any changes to documentation here.

Related Issues

closes @issue37