Allow platform admins to change user auth in the UI

So we do not have to go into the db when we need to change user
auth.

We do not allow this for users who use webauthn. We do not want to
enable security downgrade for those users.
This commit is contained in:
Pea Tyczynska
2022-02-23 19:57:27 +00:00
committed by Leo Hemsted
parent 8da8b167c9
commit 08f0393553
7 changed files with 175 additions and 2 deletions

View File

@@ -1015,6 +1015,16 @@ def filter_by_broadcast_permissions(valuelist):
return [entry for entry in valuelist if any(entry in option for option in broadcast_permission_options)]
class AuthTypeForm(StripWhitespaceForm):
auth_type = GovukRadiosField(
'Sign in using',
choices=[
('sms_auth', 'Text message code'),
('email_auth', 'Email link'),
]
)
class BasePermissionsForm(StripWhitespaceForm):
def __init__(self, all_template_folders=None, *args, **kwargs):
super().__init__(*args, **kwargs)