diff --git a/config/alfresco/script-services-context.xml b/config/alfresco/script-services-context.xml
index dd17c8b969..c9354bed04 100644
--- a/config/alfresco/script-services-context.xml
+++ b/config/alfresco/script-services-context.xml
@@ -101,7 +101,10 @@
people
-
+
+
+ ${spaces.store}
+
diff --git a/config/alfresco/site-services-context.xml b/config/alfresco/site-services-context.xml
index 8f717f0520..11493bcc2f 100644
--- a/config/alfresco/site-services-context.xml
+++ b/config/alfresco/site-services-context.xml
@@ -59,7 +59,7 @@
-
+
diff --git a/source/java/org/alfresco/filesys/ServerConfigurationBean.java b/source/java/org/alfresco/filesys/ServerConfigurationBean.java
index 817172c15b..6662fa79a6 100644
--- a/source/java/org/alfresco/filesys/ServerConfigurationBean.java
+++ b/source/java/org/alfresco/filesys/ServerConfigurationBean.java
@@ -108,9 +108,6 @@ import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
import net.sf.acegisecurity.AuthenticationManager;
@@ -123,7 +120,7 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
// Debug logging
- private static final Log logger = LogFactory.getLog("org.alfresco.smb.protocol");
+ protected static final Log logger = LogFactory.getLog("org.alfresco.smb.protocol");
// Filesystem configuration constants
@@ -643,7 +640,7 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
*
* @param config Config
*/
- private final void processCIFSServerConfig(Config config)
+ protected void processCIFSServerConfig(Config config)
{
// If the configuration section is not valid then CIFS is disabled
@@ -1331,9 +1328,10 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
if ( cifsConfig.useWinsockNetBIOS() == true && X64.isWindows64())
{
- // Log a warning
+ // Debug
- logger.warn("Using older Netbios() API code");
+ if ( logger.isDebugEnabled())
+ logger.debug("Using older Netbios() API code");
// Use the older NetBIOS API code
@@ -1592,7 +1590,7 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
*
* @param config Config
*/
- private final void processFTPServerConfig(Config config)
+ protected void processFTPServerConfig(Config config)
{
// If the configuration section is not valid then FTP is disabled
@@ -1857,7 +1855,7 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
*
* @param config Config
*/
- private final void processNFSServerConfig(Config config)
+ protected void processNFSServerConfig(Config config)
{
// If the configuration section is not valid then NFS is disabled
@@ -2076,7 +2074,7 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
*
* @param config Config
*/
- private final void processFilesystemsConfig(Config config)
+ protected void processFilesystemsConfig(Config config)
{
// Get the top level filesystems configuration element
@@ -2284,7 +2282,7 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
*
* @param config Config
*/
- private final void processSecurityConfig(Config config)
+ protected void processSecurityConfig(Config config)
{
// Create the security configuration section
@@ -2342,6 +2340,8 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
ConfigElement classElem = mapperElem.getChild( "class");
if ( classElem == null)
throw new InvalidConfigurationException("Share mapper class not specified");
+
+ mapperClass = classElem.getValue();
}
// Initialize the share mapper
@@ -2439,7 +2439,7 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
* @param config Config
* @exception InvalidConfigurationException
*/
- private final void processCoreServerConfig(Config config)
+ protected void processCoreServerConfig(Config config)
throws InvalidConfigurationException
{
// Create the core server configuration section
@@ -2690,7 +2690,7 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
* @param secConfig SecurityConfigSection
* @param aclsElem ConfigElement
*/
- private final AccessControlList processAccessControlList(SecurityConfigSection secConfig, ConfigElement aclsElem)
+ protected AccessControlList processAccessControlList(SecurityConfigSection secConfig, ConfigElement aclsElem)
{
// Check if there is an access control manager configured
@@ -2782,7 +2782,7 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
* @param deskActionElem ConfigElement
* @param fileSys DiskSharedDevice
*/
- private final DesktopActionTable processDesktopActions(ConfigElement deskActionElem, DiskSharedDevice fileSys)
+ protected DesktopActionTable processDesktopActions(ConfigElement deskActionElem, DiskSharedDevice fileSys)
{
// Get the desktop action configuration elements
diff --git a/source/java/org/alfresco/filesys/auth/cifs/PassthruCifsAuthenticator.java b/source/java/org/alfresco/filesys/auth/cifs/PassthruCifsAuthenticator.java
index dbb796bf20..55f47587a6 100644
--- a/source/java/org/alfresco/filesys/auth/cifs/PassthruCifsAuthenticator.java
+++ b/source/java/org/alfresco/filesys/auth/cifs/PassthruCifsAuthenticator.java
@@ -28,6 +28,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
+import java.util.StringTokenizer;
import javax.transaction.Status;
import javax.transaction.UserTransaction;
@@ -48,6 +49,7 @@ import org.alfresco.jlan.server.auth.ntlm.TargetInfo;
import org.alfresco.jlan.server.auth.ntlm.Type1NTLMMessage;
import org.alfresco.jlan.server.auth.ntlm.Type2NTLMMessage;
import org.alfresco.jlan.server.auth.ntlm.Type3NTLMMessage;
+import org.alfresco.jlan.server.auth.passthru.AuthSessionFactory;
import org.alfresco.jlan.server.auth.passthru.AuthenticateSession;
import org.alfresco.jlan.server.auth.passthru.PassthruDetails;
import org.alfresco.jlan.server.auth.passthru.PassthruServers;
@@ -55,6 +57,7 @@ import org.alfresco.jlan.server.config.InvalidConfigurationException;
import org.alfresco.jlan.server.config.ServerConfiguration;
import org.alfresco.jlan.server.core.SharedDevice;
import org.alfresco.jlan.smb.Capability;
+import org.alfresco.jlan.smb.Protocol;
import org.alfresco.jlan.smb.SMBStatus;
import org.alfresco.jlan.smb.dcerpc.UUID;
import org.alfresco.jlan.smb.server.SMBServer;
@@ -1263,6 +1266,65 @@ public class PassthruCifsAuthenticator extends CifsAuthenticatorBase implements
}
}
+ // Check if a protocol order has been set
+
+ ConfigElement protoOrderElem = params.getChild("ProtocolOrder");
+
+ if ( protoOrderElem != null && protoOrderElem.getValue().length() > 0)
+ {
+ // Parse the protocol order list
+
+ StringTokenizer tokens = new StringTokenizer( protoOrderElem.getValue(), ",");
+ int primaryProto = Protocol.None;
+ int secondaryProto = Protocol.None;
+
+ // There should only be one or two tokens
+
+ if ( tokens.countTokens() > 2)
+ throw new AlfrescoRuntimeException("Invalid protocol order list, " + protoOrderElem.getValue());
+
+ // Get the primary protocol
+
+ if ( tokens.hasMoreTokens())
+ {
+ // Parse the primary protocol
+
+ String primaryStr = tokens.nextToken();
+
+ if ( primaryStr.equalsIgnoreCase( "TCPIP"))
+ primaryProto = Protocol.NativeSMB;
+ else if ( primaryStr.equalsIgnoreCase( "NetBIOS"))
+ primaryProto = Protocol.TCPNetBIOS;
+ else
+ throw new AlfrescoRuntimeException("Invalid protocol type, " + primaryStr);
+
+ // Check if there is a secondary protocol, and validate
+
+ if ( tokens.hasMoreTokens())
+ {
+ // Parse the secondary protocol
+
+ String secondaryStr = tokens.nextToken();
+
+ if ( secondaryStr.equalsIgnoreCase( "TCPIP") && primaryProto != Protocol.NativeSMB)
+ secondaryProto = Protocol.NativeSMB;
+ else if ( secondaryStr.equalsIgnoreCase( "NetBIOS") && primaryProto != Protocol.TCPNetBIOS)
+ secondaryProto = Protocol.TCPNetBIOS;
+ else
+ throw new AlfrescoRuntimeException("Invalid secondary protocol, " + secondaryStr);
+ }
+ }
+
+ // Set the protocol order used for passthru authentication sessions
+
+ AuthSessionFactory.setProtocolOrder( primaryProto, secondaryProto);
+
+ // DEBUG
+
+ if (logger.isDebugEnabled())
+ logger.debug("Protocol order primary=" + Protocol.asString(primaryProto) + ", secondary=" + Protocol.asString(secondaryProto));
+ }
+
// Check if we have an authentication server
if (m_passthruServers.getTotalServerCount() == 0)
diff --git a/source/java/org/alfresco/repo/action/executer/MailActionExecuter.java b/source/java/org/alfresco/repo/action/executer/MailActionExecuter.java
index 666b918b19..17e1cd1e22 100644
--- a/source/java/org/alfresco/repo/action/executer/MailActionExecuter.java
+++ b/source/java/org/alfresco/repo/action/executer/MailActionExecuter.java
@@ -24,6 +24,7 @@
*/
package org.alfresco.repo.action.executer;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
@@ -224,6 +225,7 @@ public class MailActionExecuter extends ActionExecuterAbstractBase
// Create the mime mail message
MimeMessagePreparator mailPreparer = new MimeMessagePreparator()
{
+ @SuppressWarnings("unchecked")
public void prepare(MimeMessage mimeMessage) throws MessagingException
{
if (logger.isDebugEnabled())
@@ -248,7 +250,21 @@ public class MailActionExecuter extends ActionExecuterAbstractBase
else
{
// see if multiple recipients have been supplied - as a list of authorities
- List authorities = (List)ruleAction.getParameterValue(PARAM_TO_MANY);
+ Serializable authoritiesValue = ruleAction.getParameterValue(PARAM_TO_MANY);
+ List authorities = null;
+ if (authoritiesValue != null)
+ {
+ if (authoritiesValue instanceof String)
+ {
+ authorities = new ArrayList(1);
+ authorities.add((String)authoritiesValue);
+ }
+ else
+ {
+ authorities = (List)authoritiesValue;
+ }
+ }
+
if (authorities != null && authorities.size() != 0)
{
List recipients = new ArrayList(authorities.size());
@@ -407,7 +423,7 @@ public class MailActionExecuter extends ActionExecuterAbstractBase
protected void addParameterDefinitions(List paramList)
{
paramList.add(new ParameterDefinitionImpl(PARAM_TO, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_TO)));
- paramList.add(new ParameterDefinitionImpl(PARAM_TO_MANY, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_TO_MANY), true));
+ paramList.add(new ParameterDefinitionImpl(PARAM_TO_MANY, DataTypeDefinition.ANY, false, getParamDisplayLabel(PARAM_TO_MANY), true));
paramList.add(new ParameterDefinitionImpl(PARAM_SUBJECT, DataTypeDefinition.TEXT, true, getParamDisplayLabel(PARAM_SUBJECT)));
paramList.add(new ParameterDefinitionImpl(PARAM_TEXT, DataTypeDefinition.TEXT, true, getParamDisplayLabel(PARAM_TEXT)));
paramList.add(new ParameterDefinitionImpl(PARAM_FROM, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_FROM)));
diff --git a/source/java/org/alfresco/repo/importer/ImporterBootstrap.java b/source/java/org/alfresco/repo/importer/ImporterBootstrap.java
index 0f496919f5..ead48fb615 100644
--- a/source/java/org/alfresco/repo/importer/ImporterBootstrap.java
+++ b/source/java/org/alfresco/repo/importer/ImporterBootstrap.java
@@ -39,11 +39,11 @@ import java.util.Locale;
import java.util.Properties;
import java.util.ResourceBundle;
-import net.sf.acegisecurity.Authentication;
-
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
+import org.alfresco.repo.security.authentication.AuthenticationUtil;
+import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.StoreRef;
@@ -311,34 +311,31 @@ public class ImporterBootstrap extends AbstractLifecycleBean
}
return;
}
-
- // note: in MT case, this will run in System context of tenant domain
- Authentication authentication = authenticationComponent.getCurrentAuthentication();
- if (authenticationComponent.getCurrentUserName() == null)
- {
- authenticationComponent.setCurrentUser(authenticationComponent.getSystemUserName());
- }
-
- RetryingTransactionCallback