1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-11-04 02:18:00 +01:00

Merge pull request #3282 from JCBird1012/main

Add confirmation for removing 2FA and deauthing sessions in admin panel
Dieser Commit ist enthalten in:
Daniel García 2023-02-28 23:42:47 +01:00 committet von GitHub
Commit da8225a3bd
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

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