Commit bfcd390f authored by Matt Tucker's avatar Matt Tucker Committed by matt

Don't allow deletes when read-only.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5042 b35dd754-fafc-0310-a699-88a17e54d16e
parent becf6511
......@@ -105,6 +105,7 @@
## Added key: 'group.summary.search'
## Updated key: 'group.summary.no_groups'
## Added key: 'setup.sidebar.profile'
## Added key: 'user.read_only'
# Wildfire
......@@ -1462,6 +1463,10 @@ compression.settings.server.enable_info=Communication between servers will try t
compression.settings.server.disable=Not Available
compression.settings.server.disable_info=Communication between servers will not use compressed traffic.
# General user
user.read_only=Not allowed: the user account system is read-only.
# User create Page
user.create.title=Create User
......
......@@ -68,6 +68,12 @@
</head>
<body>
<% if (UserManager.getUserProvider().isReadOnly()) { %>
<div class="error">
<fmt:message key="user.read_only"/>
</div>
<% } %>
<p>
<fmt:message key="user.delete.info" />
<b><a href="user-properties.jsp?username=<%= URLEncoder.encode(user.getUsername(), "UTF-8") %>"><%= user.getUsername() %></a></b>
......@@ -86,5 +92,18 @@
<input type="submit" name="cancel" value="<fmt:message key="global.cancel" />">
</form>
<% if (UserManager.getUserProvider().isReadOnly()) { %>
<script language="Javascript" type="text/javascript">
function disable() {
var limit = document.forms[0].elements.length;
for (i=0;i<limit;i++) {
document.forms[0].elements[i].disabled = true;
}
}
disable();
</script>
<% } %>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment