0
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden synced 2024-12-14 09:33:44 +01:00

Make the admin retype the user name before deleting

This commit is contained in:
Daniel García 2019-01-07 14:48:10 +01:00
parent c9063a06b4
commit 673adde9f1
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A

View file

@ -66,8 +66,13 @@
row.find(".tmp-icon").attr("src", identicon(user.Email))
row.find(".tmp-del").on("click", function (e) {
if (confirm("Delete User '" + user.Name + "'?")) {
deleteUser(user.Id);
var name = prompt("To delete user '" + user.Name + "', please type the name below")
if (name) {
if (name == user.Name) {
deleteUser(user.Id);
} else {
alert("Wrong name, please try again")
}
}
return false;
});