Browse Source
Merge pull request #3290 from dpinse/test
Fix confirmation for removing 2FA and deauthing sessions in admin panel
pull/3289/head
Mathijs van Veluw
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
src/static/scripts/admin_users.js
|
@ -28,7 +28,8 @@ function remove2fa(event) { |
|
|
event.preventDefault(); |
|
|
event.preventDefault(); |
|
|
event.stopPropagation(); |
|
|
event.stopPropagation(); |
|
|
const id = event.target.parentNode.dataset.vwUserUuid; |
|
|
const id = event.target.parentNode.dataset.vwUserUuid; |
|
|
if (!id) { |
|
|
const email = event.target.parentNode.dataset.vwUserEmail; |
|
|
|
|
|
if (!id || !email) { |
|
|
alert("Required parameters not found!"); |
|
|
alert("Required parameters not found!"); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
@ -45,7 +46,8 @@ function deauthUser(event) { |
|
|
event.preventDefault(); |
|
|
event.preventDefault(); |
|
|
event.stopPropagation(); |
|
|
event.stopPropagation(); |
|
|
const id = event.target.parentNode.dataset.vwUserUuid; |
|
|
const id = event.target.parentNode.dataset.vwUserUuid; |
|
|
if (!id) { |
|
|
const email = event.target.parentNode.dataset.vwUserEmail; |
|
|
|
|
|
if (!id || !email) { |
|
|
alert("Required parameters not found!"); |
|
|
alert("Required parameters not found!"); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|