From f88b6d961e33071e775bd4886ee66df32e63dd69 Mon Sep 17 00:00:00 2001 From: Dylan Pinsonneault Date: Tue, 28 Feb 2023 20:38:33 -0500 Subject: [PATCH] Fix confirmation for removing 2FA and deauthing sessions in admin panel --- src/static/scripts/admin_users.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/static/scripts/admin_users.js b/src/static/scripts/admin_users.js index cdc6c3f4..444bc77c 100644 --- a/src/static/scripts/admin_users.js +++ b/src/static/scripts/admin_users.js @@ -28,7 +28,8 @@ function remove2fa(event) { event.preventDefault(); event.stopPropagation(); const id = event.target.parentNode.dataset.vwUserUuid; - if (!id) { + const email = event.target.parentNode.dataset.vwUserEmail; + if (!id || !email) { alert("Required parameters not found!"); return false; } @@ -45,7 +46,8 @@ function deauthUser(event) { event.preventDefault(); event.stopPropagation(); const id = event.target.parentNode.dataset.vwUserUuid; - if (!id) { + const email = event.target.parentNode.dataset.vwUserEmail; + if (!id || !email) { alert("Required parameters not found!"); return false; }