Add flag to say if user is eligible for WebAuthn

Currently we have some data-driven roles to say who can use this
feature. Adding a flag in the API means we can avoid API calls in
the Admin app to determine the same.

Allowing members of the GOV.UK Notify service to use the feature
is a workaround, so we can avoid making someone a Platform Admin
before they've protected their account with it.
This commit is contained in:
Ben Thorner
2021-06-25 17:29:19 +01:00
parent 2b292ebd16
commit 2fa6327efb
3 changed files with 27 additions and 0 deletions

View File

@@ -72,6 +72,7 @@ def test_get_user(admin_request, sample_service, sample_organisation):
assert fetched['permissions'].keys() == {str(sample_service.id)}
assert fetched['services'] == [str(sample_service.id)]
assert fetched['organisations'] == [str(sample_organisation.id)]
assert fetched['can_use_webauthn'] is False
assert sorted(fetched['permissions'][str(sample_service.id)]) == sorted(expected_permissions)