Disallow deleting your own user or removing admin role
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
|
||||
<form:form method="post" action="userSettings.view" modelAttribute="command">
|
||||
<table style="${command.admin ? 'display:none' : ''}">
|
||||
<tr>
|
||||
<tr style="${command.currentUser ? 'display:none' : ''}">
|
||||
<td><form:checkbox path="adminRole" id="admin" cssClass="checkbox"/></td>
|
||||
<td><label for="admin"><fmt:message key="usersettings.admin"/></label></td>
|
||||
</tr>
|
||||
@@ -136,7 +136,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<c:if test="${not command.newUser and not command.admin}">
|
||||
<c:if test="${not command.newUser and not command.admin and not command.currentUser}">
|
||||
<table class="indent">
|
||||
<tr>
|
||||
<td><form:checkbox path="deleteUser" id="delete" cssClass="checkbox"/></td>
|
||||
|
||||
Reference in New Issue
Block a user