1
0
Fork 0

Add confirmation for removing 2FA and deauth sessions in admin panel

Dieser Commit ist enthalten in:
Jonathan Elias Caicedo 2023-02-24 16:24:48 -05:00
Ursprung af6d17b701
Commit 8f8d7418ed
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC0B4FD8C1370233

Datei anzeigen

@ -32,10 +32,13 @@ function remove2fa(event) {
alert("Required parameters not found!");
return false;
}
_post(`${BASE_URL}/admin/users/${id}/remove-2fa`,
"2FA removed correctly",
"Error removing 2FA"
);
const confirmed = confirm(`Are you sure you want to remove 2FA for "${email}"?`);
if (confirmed) {
_post(`${BASE_URL}/admin/users/${id}/remove-2fa`,
"2FA removed correctly",
"Error removing 2FA"
);
}
}
function deauthUser(event) {
@ -46,10 +49,13 @@ function deauthUser(event) {
alert("Required parameters not found!");
return false;
}
_post(`${BASE_URL}/admin/users/${id}/deauth`,
"Sessions deauthorized correctly",
"Error deauthorizing sessions"
);
const confirmed = confirm(`Are you sure you want to deauthorize sessions for "${email}"?`);
if (confirmed) {
_post(`${BASE_URL}/admin/users/${id}/deauth`,
"Sessions deauthorized correctly",
"Error deauthorizing sessions"
);
}
}
function disableUser(event) {