vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 673adde9f1fd11962005439ba018f4cf60d6f404
parent c9063a06b41fb9ee6a1c21dc2037e158176d84f6
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Mon,  7 Jan 2019 14:48:10 +0100

Make the admin retype the user name before deleting

Diffstat:
Msrc/static/admin.html | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/static/admin.html b/src/static/admin.html @@ -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; });