dont allow deleting yourself in my users tab in web ui
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Aug 12, 2024 at 16:01 UTC
899ff0c742f8f1e55f2a875d04980e3c3460a865
1 file changed
+1
-1
views/default.handlebars
+1
-1
@@ -16675,7 +16675,7 @@
16675
16676
// Show bottom buttons
16677
x = '<div style=float:right;font-size:small>';
16678
- if (userAdminRights) { x += '<a href=# style=cursor:pointer onclick=\'return p30showDeleteUserDialog()\' title="' + "Remove this user" + '">' + "Delete User" + '</a>'; }
16678
+ if (userAdminRights && (userinfo._id != user._id)) { x += '<a href=# style=cursor:pointer onclick=\'return p30showDeleteUserDialog()\' title="' + "Remove this user" + '">' + "Delete User" + '</a>'; }
16679
x += '</div><div style=font-size:small>';
16680
// If user admin rights and not SSPI/LDAP and UserID does not start with ~, show change password
16681
if (userAdminRights && ((features & 0x00080000) == 0) && (user._id.split('/')[2][0] != '~')) {