Merged V4.0-BUG-FIX to HEAD

36744: Fix for ALF-14227: "Bulk Filesystem In-place Import Tool: 'Replace existing files' option is not working - it is enabled when the check-box was unchecked"
   36745: Fix for ALF-13355: "CMIS: Error occurs trying to delete a multilingual document"
   36763: ALF-14226: User with '@' symbol in username cannot login
   - note: related to ALF-13755
   36795: Merged V4.0 to V4.0-BUG-FIX
      36779: ALF-14237 Upgrades from 4.0.0.x/4..0.1.0 will not fix the timestamps on acl changesets - SOLR will skip ACLs set prior to upgrade
      36794: ALF-14094: Correction to from address generation for invitation reject email
   36796: Merged V4.0 to V4.0-BUG-FIX (RECORD ONLY)
      36765: Merged V4.0-BUG-FIX to V4.0
         36763: ALF-14226: User with '@' symbol in username cannot login
         - note: related to ALF-13755
   36797: Merged V3.4-BUG-FIX to V4.0-BUG-FIX
      36773: Merged DEV to V3.4-BUG-FIX (with improvements)
         36739: ALF-11835 : Authentication chain should be validated
            The existence of a subsystem in a chain is validated by a check for presence of the corresponding resources.
      36784: ALF-10181 Missing files from enterprise SDK
         - Added missing Enterprise Config
      36793: (RECORD ONLY) ALF-12776: Correction to from address generation for invitation reject email


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@36799 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2012-05-23 13:43:40 +00:00
parent 77717de7f3
commit 1029814dbe
8 changed files with 71 additions and 28 deletions

View File

@@ -165,6 +165,7 @@
<ref bean="patch.db-V4.0-Node-Locale" /> <ref bean="patch.db-V4.0-Node-Locale" />
<ref bean="patch.db-V4.0-SubscriptionTables" /> <ref bean="patch.db-V4.0-SubscriptionTables" />
<ref bean="patch.db-V4.0-SolrTracking" /> <ref bean="patch.db-V4.0-SolrTracking" />
<ref bean="patch.db-V4.0-AclChangeSet2" />
</list> </list>
</property> </property>
</bean> </bean>

View File

@@ -0,0 +1,31 @@
--
-- Title: Set ACL change set timestamps to sensible values after previous incorrect update
-- Database: Generic
-- Since: V4.0 Schema 5033
-- Author: Andy Hind
--
-- Please contact support@alfresco.com if you need assistance with the upgrade.
--
-- Migrate data
--FOREACH alf_acl_change_set.id system.upgrade.alf_acl_change_set.batchsize
UPDATE alf_acl_change_set
SET
commit_time_ms = (select min(t.commit_time_ms) from alf_transaction t)
WHERE
id >= ${LOWERBOUND} AND id <= ${UPPERBOUND}
AND commit_time_ms < (select min(t.commit_time_ms) from alf_transaction t)
;
--
-- Record script finish
--
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V4.0-AclChangeSet2';
INSERT INTO alf_applied_patch
(id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
VALUES
(
'patch.db-V4.0-AclChangeSet2', 'Manually executed script upgrade V4.0: Set ACL change set timestamps to sensible values after previous incorrect update',
0, 6008, -1, 6009, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
);

View File

@@ -3176,6 +3176,17 @@
</property> </property>
</bean> </bean>
<bean id="patch.db-V4.0-AclChangeSet2" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
<property name="id" value="patch.db-V4.0-AclChangeSet2" />
<property name="description" value="patch.schemaUpgradeScript.description" />
<property name="fixesFromSchema" value="0" />
<property name="fixesToSchema" value="6008" />
<property name="targetSchema" value="6009" />
<property name="scriptUrl">
<value>classpath:alfresco/dbscripts/upgrade/4.0/${db.script.dialect}/AclChangeSet-Tracking2.sql</value>
</property>
</bean>
<bean id="patch.swsdpPatch" class="org.alfresco.repo.admin.patch.impl.SWSDPPatch" parent="basePatch" > <bean id="patch.swsdpPatch" class="org.alfresco.repo.admin.patch.impl.SWSDPPatch" parent="basePatch" >
<property name="id"><value>patch.swsdpPatch</value></property> <property name="id"><value>patch.swsdpPatch</value></property>
<property name="description"><value>patch.swsdpPatch.description</value></property> <property name="description"><value>patch.swsdpPatch.description</value></property>

View File

@@ -19,4 +19,4 @@ version.build=@build-number@
# Schema number # Schema number
version.schema=6008 version.schema=6009

View File

@@ -1519,19 +1519,6 @@ public class AlfrescoCmisServiceImpl extends AbstractCmisService implements Alfr
nodeRef = info.getCurrentNodeNodeRef(); nodeRef = info.getCurrentNodeNodeRef();
} }
// remove not primary parent associations
List<ChildAssociationRef> childAssociations = connector.getNodeService().getParentAssocs(nodeRef);
if (childAssociations != null)
{
for (ChildAssociationRef childAssoc : childAssociations)
{
if (!childAssoc.isPrimary())
{
connector.getNodeService().removeChildAssociation(childAssoc);
}
}
}
// attempt to delete the node // attempt to delete the node
if (allVersions) if (allVersions)
{ {

View File

@@ -403,7 +403,7 @@ public class InviteHelper implements InitializingBean
// Send // Send
Action emailAction = actionService.createAction("mail"); Action emailAction = actionService.createAction("mail");
emailAction.setParameterValue(MailActionExecuter.PARAM_TO, nodeService.getProperty(personService.getPerson(inviteeUserName), ContentModel.PROP_EMAIL)); emailAction.setParameterValue(MailActionExecuter.PARAM_TO, nodeService.getProperty(personService.getPerson(inviteeUserName), ContentModel.PROP_EMAIL));
emailAction.setParameterValue(MailActionExecuter.PARAM_FROM, reviewer); emailAction.setParameterValue(MailActionExecuter.PARAM_FROM, nodeService.getProperty(personService.getPerson(reviewer), ContentModel.PROP_EMAIL));
//TODO Localize this. //TODO Localize this.
emailAction.setParameterValue(MailActionExecuter.PARAM_SUBJECT, "Rejected invitation to web site:" + resourceName); emailAction.setParameterValue(MailActionExecuter.PARAM_SUBJECT, "Rejected invitation to web site:" + resourceName);
emailAction.setParameterValue(MailActionExecuter.PARAM_TEXT, emailMsg); emailAction.setParameterValue(MailActionExecuter.PARAM_TEXT, emailMsg);

View File

@@ -31,6 +31,7 @@ import java.util.TreeMap;
import java.util.TreeSet; import java.util.TreeSet;
import org.alfresco.config.JndiPropertiesFactoryBean; import org.alfresco.config.JndiPropertiesFactoryBean;
import org.alfresco.util.ResourceFinder;
import org.alfresco.util.config.RepositoryPathConfigBean; import org.alfresco.util.config.RepositoryPathConfigBean;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@@ -253,6 +254,12 @@ public class ChildApplicationContextFactory extends AbstractPropertyBackedBean i
} }
super.afterPropertiesSet(); super.afterPropertiesSet();
// Validate that context files exist for this path
if (new ResourceFinder(getParent()).getResources(getContextResourcePatterns()).length == 0)
{
throw new IllegalStateException("Invalid type " + getTypeName() + " specified for "+ getCategory() + " subsystem. No context file found");
}
} }
/* /*
@@ -373,6 +380,23 @@ public class ChildApplicationContextFactory extends AbstractPropertyBackedBean i
} }
} }
private String[] getContextResourcePatterns()
{
return new String[]
{
ChildApplicationContextFactory.CLASSPATH_PREFIX + getCategory() + '/' + getTypeName()
+ ChildApplicationContextFactory.CONTEXT_SUFFIX,
ChildApplicationContextFactory.EXTENSION_CLASSPATH_PREFIX
+ getCategory()
+ '/'
+ getTypeName()
+ '/'
+ ChildApplicationContextFactory.this.getId().get(
ChildApplicationContextFactory.this.getId().size() - 1)
+ ChildApplicationContextFactory.CONTEXT_SUFFIX
};
}
/** /**
* A specialized application context class with the power to propagate simple and composite property values into * A specialized application context class with the power to propagate simple and composite property values into
* beans before they are initialized. * beans before they are initialized.
@@ -398,18 +422,7 @@ public class ChildApplicationContextFactory extends AbstractPropertyBackedBean i
private ChildApplicationContext(Properties properties, private ChildApplicationContext(Properties properties,
Map<String, Map<String, CompositeDataBean>> compositeProperties) throws BeansException Map<String, Map<String, CompositeDataBean>> compositeProperties) throws BeansException
{ {
super(new String[] super(getContextResourcePatterns(), false, ChildApplicationContextFactory.this.getParent());
{
ChildApplicationContextFactory.CLASSPATH_PREFIX + getCategory() + '/' + getTypeName()
+ ChildApplicationContextFactory.CONTEXT_SUFFIX,
ChildApplicationContextFactory.EXTENSION_CLASSPATH_PREFIX
+ getCategory()
+ '/'
+ getTypeName()
+ '/'
+ ChildApplicationContextFactory.this.getId().get(ChildApplicationContextFactory.this.getId().size() - 1)
+ ChildApplicationContextFactory.CONTEXT_SUFFIX
}, false, ChildApplicationContextFactory.this.getParent());
this.compositeProperties = compositeProperties; this.compositeProperties = compositeProperties;

View File

@@ -574,7 +574,7 @@ public class MultiTServiceImpl implements TenantService
public String getUserDomain(String username) public String getUserDomain(String username)
{ {
// can be null (e.g. for System user / during app ctx init) // can be null (e.g. for System user / during app ctx init)
if (username != null) if ((username != null) && AuthenticationUtil.isMtEnabled())
{ {
int idx = username.lastIndexOf(SEPARATOR); int idx = username.lastIndexOf(SEPARATOR);
if ((idx > 0) && (idx < (username.length()-1))) if ((idx > 0) && (idx < (username.length()-1)))