dont allow deleting yourself in my users tab in web ui

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-08-12 16:01:36 +01:00
parent 61f1c22c27
commit 899ff0c742

View File

@ -16675,7 +16675,7 @@
// Show bottom buttons
x = '<div style=float:right;font-size:small>';
if (userAdminRights) { x += '<a href=# style=cursor:pointer onclick=\'return p30showDeleteUserDialog()\' title="' + "Remove this user" + '">' + "Delete User" + '</a>'; }
if (userAdminRights && (userinfo._id != user._id)) { x += '<a href=# style=cursor:pointer onclick=\'return p30showDeleteUserDialog()\' title="' + "Remove this user" + '">' + "Delete User" + '</a>'; }
x += '</div><div style=font-size:small>';
// If user admin rights and not SSPI/LDAP and UserID does not start with ~, show change password
if (userAdminRights && ((features & 0x00080000) == 0) && (user._id.split('/')[2][0] != '~')) {