mirror of
https://github.com/gophish/gophish
synced 2024-11-14 00:07:19 +00:00
Disallow deleting of admin user from the UI (#2487)
This commit is contained in:
parent
0c255bbe92
commit
d0ff3829e5
2 changed files with 9 additions and 1 deletions
2
static/js/dist/app/users.min.js
vendored
2
static/js/dist/app/users.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -89,6 +89,14 @@ const deleteUser = (id) => {
|
|||
if (!user) {
|
||||
return
|
||||
}
|
||||
if (user.username == "admin") {
|
||||
Swal.fire({
|
||||
title: "Unable to Delete User",
|
||||
text: "The user account " + escapeHtml(user.username) + " cannot be deleted.",
|
||||
type: "info"
|
||||
});
|
||||
return
|
||||
}
|
||||
Swal.fire({
|
||||
title: "Are you sure?",
|
||||
text: "This will delete the account for " + escapeHtml(user.username) + " as well as all of the objects they have created.\n\nThis can't be undone!",
|
||||
|
|
Loading…
Reference in a new issue