Commit 3836c3c0 authored by wroot's avatar wroot

Merge remote-tracking branch 'igniterealtime/master'

parents 2d5c65c3 e3373fc5
This diff is collapsed.
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
package org.jivesoftware.database; package org.jivesoftware.database;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;
import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.JiveGlobals;
import org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF; import org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF;
import org.logicalcobwebs.proxool.ProxoolException; import org.logicalcobwebs.proxool.ProxoolException;
...@@ -33,6 +28,11 @@ import org.logicalcobwebs.proxool.admin.SnapshotIF; ...@@ -33,6 +28,11 @@ import org.logicalcobwebs.proxool.admin.SnapshotIF;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;
/** /**
* Default Jive connection provider, which uses an internal connection pool.<p> * Default Jive connection provider, which uses an internal connection pool.<p>
* *
...@@ -94,7 +94,7 @@ public class DefaultConnectionProvider implements ConnectionProvider { ...@@ -94,7 +94,7 @@ public class DefaultConnectionProvider implements ConnectionProvider {
public void start() { public void start() {
proxoolURL = "proxool.openfire:"+getDriver()+":"+getServerURL(); proxoolURL = "proxool.openfire:"+getDriver()+":"+getServerURL();
settings = new Properties(); settings = new Properties();
settings.setProperty("proxool.maximum-activetime", Integer.toString(activeTimeout)); settings.setProperty("proxool.maximum-active-time", Integer.toString(activeTimeout));
settings.setProperty("proxool.maximum-connection-count", Integer.toString(getMaxConnections())); settings.setProperty("proxool.maximum-connection-count", Integer.toString(getMaxConnections()));
settings.setProperty("proxool.minimum-connection-count", Integer.toString(getMinConnections())); settings.setProperty("proxool.minimum-connection-count", Integer.toString(getMinConnections()));
settings.setProperty("proxool.maximum-connection-lifetime", Integer.toString((int)(86400000 * getConnectionTimeout()))); settings.setProperty("proxool.maximum-connection-lifetime", Integer.toString((int)(86400000 * getConnectionTimeout())));
......
...@@ -560,19 +560,15 @@ public class XMPPServer { ...@@ -560,19 +560,15 @@ public class XMPPServer {
private void initModules() { private void initModules() {
for (Module module : modules.values()) { for (Module module : modules.values()) {
boolean isInitialized = false;
try { try {
module.initialize(this); module.initialize(this);
isInitialized = true;
} }
catch (Exception e) { catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
// Remove the failed initialized module // Remove the failed initialized module
this.modules.remove(module.getClass()); this.modules.remove(module.getClass());
if (isInitialized) { module.stop();
module.stop(); module.destroy();
module.destroy();
}
logger.error(LocaleUtils.getLocalizedString("admin.error"), e); logger.error(LocaleUtils.getLocalizedString("admin.error"), e);
} }
} }
...@@ -585,16 +581,12 @@ public class XMPPServer { ...@@ -585,16 +581,12 @@ public class XMPPServer {
*/ */
private void startModules() { private void startModules() {
for (Module module : modules.values()) { for (Module module : modules.values()) {
boolean started = false;
try { try {
logger.debug( "Starting module: " + module.getName() );
module.start(); module.start();
} }
catch (Exception e) { catch (Exception e) {
if (started && module != null) { logger.error( "An exception occurred while starting module '{}'.", module.getName(), e );
module.stop();
module.destroy();
}
logger.error(LocaleUtils.getLocalizedString("admin.error"), e);
} }
} }
} }
......
...@@ -1072,11 +1072,11 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener { ...@@ -1072,11 +1072,11 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener {
throw new ForbiddenException(); throw new ForbiddenException();
default: default:
case visitor: case visitor:
if (canSendPrivateMessage.equals( "participants" )) throw new ForbiddenException(); if (canSendPrivateMessage().equals( "participants" )) throw new ForbiddenException();
case participant: case participant:
if (canSendPrivateMessage.equals( "moderators" )) throw new ForbiddenException(); if (canSendPrivateMessage().equals( "moderators" )) throw new ForbiddenException();
case moderator: case moderator:
if (canSendPrivateMessage.equals( "none" )) throw new ForbiddenException(); if (canSendPrivateMessage().equals( "none" )) throw new ForbiddenException();
} }
String resource = packet.getTo().getResource(); String resource = packet.getTo().getResource();
List<MUCRole> occupants = occupantsByNickname.get(resource.toLowerCase()); List<MUCRole> occupants = occupantsByNickname.get(resource.toLowerCase());
......
...@@ -20,24 +20,19 @@ ...@@ -20,24 +20,19 @@
package org.jivesoftware.openfire.spi; package org.jivesoftware.openfire.spi;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.security.KeyStore;
import java.security.cert.X509Certificate;
import java.util.*;
import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.buffer.SimpleBufferAllocator; import org.apache.mina.core.buffer.SimpleBufferAllocator;
import org.apache.mina.transport.socket.nio.NioSocketAcceptor; import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
import org.jivesoftware.openfire.*; import org.jivesoftware.openfire.Connection;
import org.jivesoftware.openfire.ConnectionManager;
import org.jivesoftware.openfire.ServerPort;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.container.BasicModule; import org.jivesoftware.openfire.container.BasicModule;
import org.jivesoftware.openfire.container.PluginManager; import org.jivesoftware.openfire.container.PluginManager;
import org.jivesoftware.openfire.container.PluginManagerListener; import org.jivesoftware.openfire.container.PluginManagerListener;
import org.jivesoftware.openfire.http.HttpBindManager; import org.jivesoftware.openfire.http.HttpBindManager;
import org.jivesoftware.openfire.keystore.CertificateStoreManager; import org.jivesoftware.openfire.keystore.CertificateStoreManager;
import org.jivesoftware.openfire.net.*; import org.jivesoftware.openfire.net.SocketSendingTracker;
import org.jivesoftware.openfire.session.ConnectionSettings; import org.jivesoftware.openfire.session.ConnectionSettings;
import org.jivesoftware.util.CertificateEventListener; import org.jivesoftware.util.CertificateEventListener;
import org.jivesoftware.util.CertificateManager; import org.jivesoftware.util.CertificateManager;
...@@ -46,6 +41,13 @@ import org.jivesoftware.util.PropertyEventListener; ...@@ -46,6 +41,13 @@ import org.jivesoftware.util.PropertyEventListener;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.security.KeyStore;
import java.security.cert.X509Certificate;
import java.util.*;
public class ConnectionManagerImpl extends BasicModule implements ConnectionManager, CertificateEventListener, PropertyEventListener public class ConnectionManagerImpl extends BasicModule implements ConnectionManager, CertificateEventListener, PropertyEventListener
{ {
public static final String EXECUTOR_FILTER_NAME = "threadModel"; public static final String EXECUTOR_FILTER_NAME = "threadModel";
...@@ -274,24 +276,32 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana ...@@ -274,24 +276,32 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
private synchronized void startListeners() private synchronized void startListeners()
{ {
// Check if plugins have been loaded // Check if plugins have been loaded
Log.debug( "Received a request to start listeners. Have plugins been loaded?" );
PluginManager pluginManager = XMPPServer.getInstance().getPluginManager(); PluginManager pluginManager = XMPPServer.getInstance().getPluginManager();
if (!pluginManager.isExecuted()) { if ( !pluginManager.isExecuted() )
pluginManager.addPluginManagerListener(new PluginManagerListener() { {
public void pluginsMonitored() { Log.debug( "Plugins not yet loaded. Waiting for plugins to be loaded..." );
pluginManager.addPluginManagerListener( new PluginManagerListener()
{
public void pluginsMonitored()
{
Log.debug( "Received plugin monitor event! Plugins should now be loaded." );
// Stop listening for plugin events // Stop listening for plugin events
XMPPServer.getInstance().getPluginManager().removePluginManagerListener(this); XMPPServer.getInstance().getPluginManager().removePluginManagerListener( this );
// Start listeners // Start listeners
startListeners(); startListeners();
} }
}); } );
return; return;
} }
Log.debug( "Starting listeners..." );
for ( final ConnectionListener listener : getListeners() ) for ( final ConnectionListener listener : getListeners() )
{ {
try try
{ {
listener.start(); listener.start();
Log.debug( "Started '{}' (port {}) listener.", listener.getType(), listener.getPort() );
} }
catch ( RuntimeException ex ) catch ( RuntimeException ex )
{ {
...@@ -303,6 +313,7 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana ...@@ -303,6 +313,7 @@ public class ConnectionManagerImpl extends BasicModule implements ConnectionMana
try try
{ {
HttpBindManager.getInstance().start(); HttpBindManager.getInstance().start();
Log.debug( "Started HTTP client listener." );
} }
catch ( RuntimeException ex ) catch ( RuntimeException ex )
{ {
......
...@@ -43,6 +43,11 @@ ...@@ -43,6 +43,11 @@
<h1> <h1>
Client Control Plugin Changelog Client Control Plugin Changelog
</h1> </h1>
<p><b>2.0.1</b> -- November 4, 2016</p>
<ul>
<li>[<a href='http://www.igniterealtime.org/issues/browse/OF-1211'>OF-1211</a>] - Updated description for 'Broadcasting' option to correspond with issue resolved in ticket SPARK-1827. Locale files updated are EN, CZ, ES, FR, PT_BR.</li>
</ul>
<p><b>2.0.0</b> -- January 11, 2016</p> <p><b>2.0.0</b> -- January 11, 2016</p>
<ul> <ul>
<li>No longer supports Bookmarks functionality (this functionality has been moved to the new Bookmarks Plugin).</li> <li>No longer supports Bookmarks functionality (this functionality has been moved to the new Bookmarks Plugin).</li>
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<name>Client Control</name> <name>Client Control</name>
<description>Controls clients allowed to connect and available features</description> <description>Controls clients allowed to connect and available features</description>
<author>Jive Software</author> <author>Jive Software</author>
<version>2.0.0</version> <version>2.0.1</version>
<date>1/11/2015</date> <date>11/04/2016</date>
<minServerVersion>4.0.0</minServerVersion> <minServerVersion>4.0.0</minServerVersion>
<!-- UI extension --> <!-- UI extension -->
......
...@@ -60,7 +60,7 @@ client.features.update.features = Client feature permissions have been updated. ...@@ -60,7 +60,7 @@ client.features.update.features = Client feature permissions have been updated.
client.features.info = Use the form below to enable or disable client features. \ client.features.info = Use the form below to enable or disable client features. \
Note: Some of the client restrictions only apply to the Spark client. Note: Some of the client restrictions only apply to the Spark client.
client.features.broadcasting = Broadcasting client.features.broadcasting = Broadcasting
client.features.broadcasting.description = Allow for broadcasting of messages to specified groups or entire roster. client.features.broadcasting.description = Allow for broadcasting of messages.
client.features.enabled = Enabled client.features.enabled = Enabled
client.features.disabled = Disabled client.features.disabled = Disabled
client.features.filetransfer = File Transfer client.features.filetransfer = File Transfer
......
...@@ -42,7 +42,7 @@ client.features.update.features = Povolen\u00ed mo\u017enost\u00ed klient\u016f ...@@ -42,7 +42,7 @@ client.features.update.features = Povolen\u00ed mo\u017enost\u00ed klient\u016f
client.features.info = Pou\u017eijte spodn\u00ed formul\u00e1\u0159 pro povolen\u00ed \u010di zak\u00e1z\u00e1n\u00ed mo\u017enost\u00ed klient\u016f. \ client.features.info = Pou\u017eijte spodn\u00ed formul\u00e1\u0159 pro povolen\u00ed \u010di zak\u00e1z\u00e1n\u00ed mo\u017enost\u00ed klient\u016f. \
Pozn\u00e1mka: N\u011bkter\u00e1 omezen\u00ed klient\u016f se t\u00fdkaj\u00ed jen Spark klienta. Pozn\u00e1mka: N\u011bkter\u00e1 omezen\u00ed klient\u016f se t\u00fdkaj\u00ed jen Spark klienta.
client.features.broadcasting = Vys\u00edl\u00e1n\u00ed client.features.broadcasting = Vys\u00edl\u00e1n\u00ed
client.features.broadcasting.description = Povoluje vys\u00edl\u00e1n\u00ed zpr\u00e1v specifick\u00fdm skupin\u00e1m nebo cel\u00e9mu seznamu. client.features.broadcasting.description = Povoluje vys\u00edl\u00e1n\u00ed zpr\u00e1v.
client.features.enabled = Povoleno client.features.enabled = Povoleno
client.features.disabled = Zak\u00e1z\u00e1no client.features.disabled = Zak\u00e1z\u00e1no
client.features.filetransfer = P\u0159enos soubor\u016f client.features.filetransfer = P\u0159enos soubor\u016f
......
...@@ -57,7 +57,7 @@ client.features.update.features = Permisos de prestaciones de clientes han sido ...@@ -57,7 +57,7 @@ client.features.update.features = Permisos de prestaciones de clientes han sido
client.features.info = Utilice el siguiente formulario para habilitar o deshabilitar prestaciones de clientes. \ client.features.info = Utilice el siguiente formulario para habilitar o deshabilitar prestaciones de clientes. \
Nota: Algunas de las restricciones de clientes s\u00f3lo aplican al cliente Spark. Nota: Algunas de las restricciones de clientes s\u00f3lo aplican al cliente Spark.
client.features.broadcasting = Difusi\u00f3n client.features.broadcasting = Difusi\u00f3n
client.features.broadcasting.description = Permitir difundir mensajes a grupos espec\u00edficos o lista de contactos. client.features.broadcasting.description = Permitir difundir mensajes.
client.features.enabled = Habilitado client.features.enabled = Habilitado
client.features.disabled = Deshabilitado client.features.disabled = Deshabilitado
client.features.filetransfer = Transferencia de Archivos client.features.filetransfer = Transferencia de Archivos
......
...@@ -116,7 +116,7 @@ archive.settings.title=Param\u00e8tres d'Archivage ...@@ -116,7 +116,7 @@ archive.settings.title=Param\u00e8tres d'Archivage
archive.settings.update.settings=Param\u00e8tres de Mise \u00e0 jour archive.settings.update.settings=Param\u00e8tres de Mise \u00e0 jour
client.feature=Module client.feature=Module
client.features.broadcasting=Diffusion client.features.broadcasting=Diffusion
client.features.broadcasting.description=Permet d'envoyer un message a certains groupes ou tout un roster. client.features.broadcasting.description=Permet d'envoyer un message.
client.features.disabled=D\u00e9sactiv\u00e9 client.features.disabled=D\u00e9sactiv\u00e9
client.features.enabled=Activ\u00e9 client.features.enabled=Activ\u00e9
client.features.filetransfer=Transfert de Fichiers client.features.filetransfer=Transfert de Fichiers
......
...@@ -79,7 +79,7 @@ client.features.update.features = Permiss\u00f5es de funcionalidades do cliente ...@@ -79,7 +79,7 @@ client.features.update.features = Permiss\u00f5es de funcionalidades do cliente
client.features.info = Utilize o formul\u00e1rio abaixo para habilitar ou desabilitar funcionalidades de cliente \ client.features.info = Utilize o formul\u00e1rio abaixo para habilitar ou desabilitar funcionalidades de cliente \
Notex: Algumas das restri\u00e7\u00f5es de cliente aplicam-se somente ao cliente Spark. Notex: Algumas das restri\u00e7\u00f5es de cliente aplicam-se somente ao cliente Spark.
client.features.broadcasting = Transmitindo client.features.broadcasting = Transmitindo
client.features.broadcasting.description = Permitir transmiss\u00e3o de mensagens para um grupo espec\u00edfico ou lista completa. client.features.broadcasting.description = Permitir transmiss\u00e3o de mensagens.
client.features.enabled = Habilitado client.features.enabled = Habilitado
client.features.disabled = Desabilitado client.features.disabled = Desabilitado
client.features.filetransfer = Transfer\u00eancia de Arquivo client.features.filetransfer = Transfer\u00eancia de Arquivo
......
...@@ -44,10 +44,15 @@ ...@@ -44,10 +44,15 @@
Hazelcast Clustering Plugin Changelog Hazelcast Clustering Plugin Changelog
</h1> </h1>
<p><b>2.2.1</b> -- November 4, 2016</p>
<ul>
<li>[<a href='http://www.igniterealtime.org/issues/browse/OF-1210'>OF-1210</a>] - correct time-to-live-seconds and MaxLifetime settings for hazelcast</li>
</ul>
<p><b>2.2.0</b> -- October 12, 2015</p> <p><b>2.2.0</b> -- October 12, 2015</p>
<ul> <ul>
<li>[<a href='http://www.igniterealtime.org/issues/browse/OF-953'>OF-953</a>] - Updated JSP libraries.</li> <li>[<a href='http://www.igniterealtime.org/issues/browse/OF-953'>OF-953</a>] - Updated JSP libraries.</li>
<li>Requires Openfire 3.11.0.</li> <li>Requires Openfire 4.0.0</li>
</ul> </ul>
<p><b>2.1.2</b> -- September 16, 2015</p> <p><b>2.1.2</b> -- September 16, 2015</p>
......
...@@ -420,6 +420,7 @@ ...@@ -420,6 +420,7 @@
<read-backup-data>true</read-backup-data> <read-backup-data>true</read-backup-data>
<max-size policy="PER_NODE">100000</max-size> <max-size policy="PER_NODE">100000</max-size>
<max-idle-seconds>3600</max-idle-seconds> <max-idle-seconds>3600</max-idle-seconds>
<time-to-live-seconds>900</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy> <eviction-policy>LRU</eviction-policy>
</map> </map>
<map name="Group"> <map name="Group">
...@@ -427,6 +428,7 @@ ...@@ -427,6 +428,7 @@
<read-backup-data>true</read-backup-data> <read-backup-data>true</read-backup-data>
<max-size policy="PER_NODE">100000</max-size> <max-size policy="PER_NODE">100000</max-size>
<max-idle-seconds>3600</max-idle-seconds> <max-idle-seconds>3600</max-idle-seconds>
<time-to-live-seconds>900</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy> <eviction-policy>LRU</eviction-policy>
</map> </map>
<map name="Roster"> <map name="Roster">
...@@ -434,6 +436,7 @@ ...@@ -434,6 +436,7 @@
<read-backup-data>true</read-backup-data> <read-backup-data>true</read-backup-data>
<max-size policy="PER_NODE">100000</max-size> <max-size policy="PER_NODE">100000</max-size>
<max-idle-seconds>3600</max-idle-seconds> <max-idle-seconds>3600</max-idle-seconds>
<time-to-live-seconds>21600</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy> <eviction-policy>LRU</eviction-policy>
</map> </map>
<map name="User"> <map name="User">
...@@ -441,6 +444,7 @@ ...@@ -441,6 +444,7 @@
<read-backup-data>true</read-backup-data> <read-backup-data>true</read-backup-data>
<max-size policy="PER_NODE">100000</max-size> <max-size policy="PER_NODE">100000</max-size>
<max-idle-seconds>3600</max-idle-seconds> <max-idle-seconds>3600</max-idle-seconds>
<time-to-live-seconds>1800</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy> <eviction-policy>LRU</eviction-policy>
</map> </map>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<name>${plugin.name}</name> <name>${plugin.name}</name>
<description>${plugin.description}</description> <description>${plugin.description}</description>
<author>Tom Evans</author> <author>Tom Evans</author>
<version>2.2.0</version> <version>2.2.1</version>
<date>10/12/2015</date> <date>11/04/2016</date>
<minServerVersion>4.0.0</minServerVersion> <minServerVersion>4.0.0</minServerVersion>
</plugin> </plugin>
...@@ -160,7 +160,7 @@ public class ClusteredCache implements Cache { ...@@ -160,7 +160,7 @@ public class ClusteredCache implements Cache {
} }
public void setMaxLifetime(long maxLifetime) { public void setMaxLifetime(long maxLifetime) {
CacheFactory.setMaxSizeProperty(getName(), maxLifetime); CacheFactory.setMaxLifetimeProperty(getName(), maxLifetime);
} }
public void destroy() { public void destroy() {
......
...@@ -21,19 +21,22 @@ ...@@ -21,19 +21,22 @@
final ConnectionType connectionType = ConnectionType.SOCKET_S2S; final ConnectionType connectionType = ConnectionType.SOCKET_S2S;
final ConnectionManagerImpl manager = (ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager(); final ConnectionManagerImpl manager = (ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager();
pageContext.setAttribute("permissionPolicy", RemoteServerManager.getPermissionPolicy().toString());
final ConnectionConfiguration plaintextConfiguration = manager.getListener( connectionType, false ).generateConnectionConfiguration(); final ConnectionConfiguration plaintextConfiguration = manager.getListener( connectionType, false ).generateConnectionConfiguration();
boolean update = request.getParameter( "update" ) != null; boolean update = request.getParameter( "update" ) != null;
boolean closeSettings = request.getParameter( "closeSettings" ) != null; boolean closeSettings = request.getParameter( "closeSettings" ) != null;
boolean serverAllowed = request.getParameter( "serverAllowed" ) != null; boolean serverAllowed = request.getParameter( "serverAllowed" ) != null;
boolean serverBlocked = request.getParameter( "serverBlocked" ) != null; boolean serverBlocked = request.getParameter( "serverBlocked" ) != null;
boolean permissionUpdate = request.getParameter( "permissionUpdate" ) != null;
String configToDelete = ParamUtils.getParameter( request, "deleteConf" ); String configToDelete = ParamUtils.getParameter( request, "deleteConf" );
final Map<String, String> errors = new HashMap<>(); final Map<String, String> errors = new HashMap<>();
Cookie csrfCookie = CookieUtils.getCookie(request, "csrf"); Cookie csrfCookie = CookieUtils.getCookie(request, "csrf");
String csrfParam = ParamUtils.getParameter(request, "csrf"); String csrfParam = ParamUtils.getParameter(request, "csrf");
if (update || closeSettings || serverAllowed || serverBlocked || configToDelete != null) { if (update || closeSettings || serverAllowed || serverBlocked || permissionUpdate || configToDelete != null) {
if (csrfCookie == null || csrfParam == null || !csrfCookie.getValue().equals(csrfParam)) { if (csrfCookie == null || csrfParam == null || !csrfCookie.getValue().equals(csrfParam)) {
update = false; update = false;
closeSettings = false; closeSettings = false;
...@@ -63,6 +66,13 @@ ...@@ -63,6 +66,13 @@
webManager.logEvent( "Updated connection settings for " + connectionType, "plain: enabled=" + plaintextEnabled + ", port=" + plaintextTcpPort); webManager.logEvent( "Updated connection settings for " + connectionType, "plain: enabled=" + plaintextEnabled + ", port=" + plaintextTcpPort);
response.sendRedirect( "connection-settings-socket-s2s.jsp?success=update" ); response.sendRedirect( "connection-settings-socket-s2s.jsp?success=update" );
} }
else if ( permissionUpdate && errors.isEmpty() )
{
final String permissionFilter = ParamUtils.getParameter( request, "permissionFilter" );
RemoteServerManager.setPermissionPolicy(permissionFilter);
webManager.logEvent( "Updated s2s permission policy to: " + permissionFilter, null);
response.sendRedirect( "connection-settings-socket-s2s.jsp?success=update" );
}
else if ( closeSettings && errors.isEmpty() ) else if ( closeSettings && errors.isEmpty() )
{ {
// TODO below is the 'idle connection' handing. This should go into the connection configuration, like all other configuration. // TODO below is the 'idle connection' handing. This should go into the connection configuration, like all other configuration.
...@@ -352,7 +362,7 @@ ...@@ -352,7 +362,7 @@
<table cellpadding="3" cellspacing="0" border="0"> <table cellpadding="3" cellspacing="0" border="0">
<tr valign="top"> <tr valign="top">
<td width="1%" nowrap> <td width="1%" nowrap>
<input type="radio" name="permissionFilter" value="blacklist" id="rb05" ${'blacklist' eq param.permissionFilter ? 'checked' : ''}> <input type="radio" name="permissionFilter" value="blacklist" id="rb05" ${permissionPolicy eq 'blacklist'? 'checked' : '' }>
</td> </td>
<td width="99%"> <td width="99%">
<label for="rb05"> <label for="rb05">
...@@ -362,7 +372,7 @@ ...@@ -362,7 +372,7 @@
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td width="1%" nowrap> <td width="1%" nowrap>
<input type="radio" name="permissionFilter" value="whitelist" id="rb06" ${'whitelist' eq param.permissionFilter ? 'checked' : ''}> <input type="radio" name="permissionFilter" value="whitelist" id="rb06" ${permissionPolicy eq 'whitelist'? 'checked' : ''}>
</td> </td>
<td width="99%"> <td width="99%">
<label for="rb06"> <label for="rb06">
...@@ -486,4 +496,4 @@ ...@@ -486,4 +496,4 @@
<!-- END 'Not Allowed to Connect' --> <!-- END 'Not Allowed to Connect' -->
</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