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

Disabled deleting groups when read only.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5782 b35dd754-fafc-0310-a699-88a17e54d16e
parent 242f6cb8
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
## Added key: 'setup.ldap.user.test.error-loading-users' ## Added key: 'setup.ldap.user.test.error-loading-users'
## Added key: 'setup.ldap.user.test.users-not-found' ## Added key: 'setup.ldap.user.test.users-not-found'
## Added key: 'setup.ldap.user.test.internal-server-error' ## Added key: 'setup.ldap.user.test.internal-server-error'
## Added key: 'group.read_only'
# Wildfire # Wildfire
...@@ -566,6 +567,9 @@ error.serverdown.is_down=is currently down. To continue: ...@@ -566,6 +567,9 @@ error.serverdown.is_down=is currently down. To continue:
error.serverdown.start=Start the server. error.serverdown.start=Start the server.
error.serverdown.login=Login to the admin console error.serverdown.login=Login to the admin console
# General group settings.
group.read_only=Not allowed: the group account system is read-only.
# Group create Page # Group create Page
group.create.title=Create Group group.create.title=Create Group
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
--%> --%>
<%@ page import="org.jivesoftware.util.*, <%@ page import="org.jivesoftware.util.*,
org.jivesoftware.admin.*,
org.jivesoftware.wildfire.group.Group, org.jivesoftware.wildfire.group.Group,
java.net.URLEncoder" java.net.URLEncoder"
errorPage="error.jsp" errorPage="error.jsp"
...@@ -55,6 +54,12 @@ ...@@ -55,6 +54,12 @@
</head> </head>
<body> <body>
<% if (webManager.getGroupManager().isReadOnly()) { %>
<div class="error">
<fmt:message key="user.read_only"/>
</div>
<% } %>
<p> <p>
<fmt:message key="group.delete.hint_info" /> <fmt:message key="group.delete.hint_info" />
<b><a href="group-edit.jsp?group=<%= URLEncoder.encode(group.getName(), "UTF-8")%>"><%= group.getName() %></a></b> <b><a href="group-edit.jsp?group=<%= URLEncoder.encode(group.getName(), "UTF-8")%>"><%= group.getName() %></a></b>
...@@ -67,5 +72,19 @@ ...@@ -67,5 +72,19 @@
<input type="submit" name="cancel" value="<fmt:message key="global.cancel" />"> <input type="submit" name="cancel" value="<fmt:message key="global.cancel" />">
</form> </form>
<% // Disable the form if a read-only user provider.
if (webManager.getGroupManager().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> </body>
</html> </html>
\ No newline at end of file
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