Commit 736ae7be authored by Matt Tucker's avatar Matt Tucker Committed by matt

Cleaned up property names (JM-91).


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@754 b35dd754-fafc-0310-a699-88a17e54d16e
parent c569013b
...@@ -11,16 +11,21 @@ ...@@ -11,16 +11,21 @@
</name> </name>
</prop> </prop>
Most properties are stored in the Jive Messenger database. A Most properties are stored in the Jive Messenger database. A
property viewer and editor is included in the admin console. property viewer and editor is included in the admin console.
--> -->
<!-- root element, all properties must be under this element --> <!-- root element, all properties must be under this element -->
<jive> <jive>
<embedded-web> <adminConsole>
<port>9090</port> <port>9090</port>
</embedded-web> <!-- By default, only the user with the username "admin" can login
to the admin console. Alternatively, you can specify a comma-delimitted
list usernames that should be authorized to login by setting the
<authorizedUsernames> field below. -->
<!-- <authorizedUsernames></authorizedUsernames> -->
</adminConsole>
<!-- Example LDAP Settings --> <!-- Example LDAP settings -->
<!-- <!--
<ldap> <ldap>
<host></host> <host></host>
...@@ -41,5 +46,5 @@ ...@@ -41,5 +46,5 @@
</auth> </auth>
</provider> </provider>
--> -->
<!-- End Example LDAP Settings --> <!-- End example LDAP settings -->
</jive> </jive>
\ No newline at end of file
...@@ -72,7 +72,7 @@ public class AdminConsolePlugin implements Plugin { ...@@ -72,7 +72,7 @@ public class AdminConsolePlugin implements Plugin {
// Configure HTTP socket listener // Configure HTTP socket listener
port = JiveGlobals.getProperty("embedded-web.port", "9090"); port = JiveGlobals.getProperty("adminConsole.port", "9090");
jetty.addListener(port); jetty.addListener(port);
// Add web-app // Add web-app
......
...@@ -322,7 +322,7 @@ public class Launcher { ...@@ -322,7 +322,7 @@ public class Launcher {
private synchronized void launchBrowser() { private synchronized void launchBrowser() {
try { try {
XMLProperties props = new XMLProperties(configFile); XMLProperties props = new XMLProperties(configFile);
String port = props.getProperty("embedded-web.port"); String port = props.getProperty("adminConsole.port");
BrowserLauncher.openURL("http://127.0.0.1:" + port + "/index.html"); BrowserLauncher.openURL("http://127.0.0.1:" + port + "/index.html");
} }
catch (Exception e) { catch (Exception e) {
......
...@@ -23,17 +23,17 @@ ...@@ -23,17 +23,17 @@
<% admin.init(request, response, session, application, out ); %> <% admin.init(request, response, session, application, out ); %>
<%! // List of allowed usernames: <%! // List of allowed usernames:
static Map allowedUsernames = null; static Map authorizedUsernames = null;
static String allowedUsernameProp = JiveGlobals.getProperty("admin.login.allowedUsernames"); static String authorizedUsernameProp = JiveGlobals.getXMLProperty("adminConsole.authorizedUsernames");
static { static {
if (allowedUsernameProp != null) { if (authorizedUsernameProp != null) {
StringTokenizer tokenizer = new StringTokenizer(allowedUsernameProp, ","); StringTokenizer tokenizer = new StringTokenizer(authorizedUsernameProp, ",");
while (tokenizer.hasMoreTokens()) { while (tokenizer.hasMoreTokens()) {
if (allowedUsernames == null) { if (authorizedUsernames == null) {
allowedUsernames = new HashMap(); authorizedUsernames = new HashMap();
} }
String tok = tokenizer.nextToken().trim(); String tok = tokenizer.nextToken().trim();
allowedUsernames.put(tok, tok); authorizedUsernames.put(tok, tok);
} }
} }
} }
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
if (ParamUtils.getBooleanParameter(request,"login")) { if (ParamUtils.getBooleanParameter(request,"login")) {
try { try {
if (allowedUsernames != null) { if (authorizedUsernames != null && !authorizedUsernames.isEmpty()) {
if (!allowedUsernames.containsKey(username)) { if (!authorizedUsernames.containsKey(username)) {
throw new UnauthorizedException("User '" + username + "' no allowed to login."); throw new UnauthorizedException("User '" + username + "' no allowed to login.");
} }
} }
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
if (errors.size() == 0) { if (errors.size() == 0) {
server.getServerInfo().setName(serverName); server.getServerInfo().setName(serverName);
JiveGlobals.setProperty("xmpp.socket.plain.port", String.valueOf(port)); JiveGlobals.setProperty("xmpp.socket.plain.port", String.valueOf(port));
JiveGlobals.setProperty("embedded-web.port", String.valueOf(embeddedPort)); JiveGlobals.setProperty("adminConsole.port", String.valueOf(embeddedPort));
JiveGlobals.setProperty("xmpp.socket.ssl.active", String.valueOf(sslEnabled)); JiveGlobals.setProperty("xmpp.socket.ssl.active", String.valueOf(sslEnabled));
JiveGlobals.setProperty("xmpp.socket.ssl.port", String.valueOf(sslPort)); JiveGlobals.setProperty("xmpp.socket.ssl.port", String.valueOf(sslPort));
response.sendRedirect("server-props.jsp?success=true"); response.sendRedirect("server-props.jsp?success=true");
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
serverName = server.getServerInfo().getName(); serverName = server.getServerInfo().getName();
sslEnabled = "true".equals(JiveGlobals.getProperty("xmpp.socket.ssl.active")); sslEnabled = "true".equals(JiveGlobals.getProperty("xmpp.socket.ssl.active"));
try { port = Integer.parseInt(JiveGlobals.getProperty("xmpp.socket.plain.port")); } catch (Exception ignored) {} try { port = Integer.parseInt(JiveGlobals.getProperty("xmpp.socket.plain.port")); } catch (Exception ignored) {}
try { embeddedPort = Integer.parseInt(JiveGlobals.getProperty("embedded-web.port")); } catch (Exception ignored) {} try { embeddedPort = Integer.parseInt(JiveGlobals.getProperty("adminConsole.port")); } catch (Exception ignored) {}
try { sslPort = Integer.parseInt(JiveGlobals.getProperty("xmpp.socket.ssl.port")); } catch (Exception ignored) {} try { sslPort = Integer.parseInt(JiveGlobals.getProperty("xmpp.socket.ssl.port")); } catch (Exception ignored) {}
} }
%> %>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
Map xmppSettings = new HashMap(); Map xmppSettings = new HashMap();
xmppSettings.put("xmpp.domain",domain); xmppSettings.put("xmpp.domain",domain);
xmppSettings.put("embedded-web.port",Integer.toString(embeddedPort)); xmppSettings.put("adminConsole.port",Integer.toString(embeddedPort));
xmppSettings.put("xmpp.socket.ssl.active",""+sslEnabled); xmppSettings.put("xmpp.socket.ssl.active",""+sslEnabled);
xmppSettings.put("xmpp.auth.anonymous", "true" ); xmppSettings.put("xmpp.auth.anonymous", "true" );
session.setAttribute("xmppSettings", xmppSettings); session.setAttribute("xmppSettings", xmppSettings);
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
// Load the current values: // Load the current values:
if (!doContinue) { if (!doContinue) {
domain = JiveGlobals.getProperty("xmpp.domain"); domain = JiveGlobals.getProperty("xmpp.domain");
embeddedPort = JiveGlobals.getIntProperty("embedded-web.port", 9090); embeddedPort = JiveGlobals.getIntProperty("adminConsole.port", 9090);
sslEnabled = JiveGlobals.getBooleanProperty("xmpp.socket.ssl.active", true); sslEnabled = JiveGlobals.getBooleanProperty("xmpp.socket.ssl.active", true);
// If the domain is still blank, guess at the value: // If the domain is still blank, guess at the value:
......
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