Let admin user delete their security key

Show confiem delete dialogue first to confirm if key should be deleted.
This commit is contained in:
Pea Tyczynska
2021-05-14 18:42:57 +01:00
parent 00c022eba5
commit a946ad6ec2
5 changed files with 116 additions and 3 deletions

View File

@@ -206,5 +206,10 @@ class UserApiClient(NotifyAdminAPIClient):
return self.post(endpoint, data={"name": new_name_for_credential})
def delete_webauthn_credential_for_user(self, *, user_id, credential_id):
endpoint = f'/user/{user_id}/webauthn/{credential_id}'
return self.delete(endpoint)
user_api_client = UserApiClient()