Merged V3.0 to HEAD

11469: MT - fix ETHREEOH-227
   11470: Added check for request method type so that GET requests are redirected to the web client and PROPFIND/OPTIONS requests are routed to the WebDAV servlet. Fix Vista WebDAV client as it walks the path when connecting using the WebDAV mini redirector. ETHREEOH-554.
   11471: Merged V2.2 to V3.0
      11317: Fix ETWOTWO-698 and ETWOTWO-743.
   11472: Fix for ETHREEOH-505
   11473: Added LMv2 support, fallback from NTLMv2 to NTLMv1 and NTLMv2 can be switched off by the implementation.
   11474: Removed the Principal configuration parameter, no longer needed as it is picked up after the server side Kerberos logon.
   11476: Missing URL encoding for site manager username in Site Profile dashlet.
   11477: Fix to padding on User Welcome dashlet now it is scrollable.
   11479: Fixed: ETHREEOH-150 Possible to add empty post or empty comment to a post at blog page
   11480: Added calculation of the LMv2 HMAC.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12445 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2008-12-17 12:50:08 +00:00
parent 01deeef511
commit 20d2d648be
7 changed files with 113 additions and 85 deletions

View File

@@ -1537,4 +1537,22 @@
</property>
</bean>
<bean id="patch.redeploySubmitProcess4" class="org.alfresco.repo.admin.patch.impl.GenericWorkflowPatch" parent="basePatch" >
<property name="id"><value>patch.redeploySubmitProcess4</value></property>
<property name="description"><value>patch.redeploySubmitProcess.description</value></property>
<property name="fixesFromSchema"><value>0</value></property>
<property name="fixesToSchema"><value>1000</value></property>
<property name="targetSchema"><value>1001</value></property>
<property name="workflowDefinitions">
<list>
<props>
<!-- WCM workflow definition -->
<prop key="engineId">jbpm</prop>
<prop key="location">alfresco/workflow/submit_processdefinition.xml</prop>
<prop key="mimetype">text/xml</prop>
</props>
</list>
</property>
</bean>
</beans>

View File

@@ -19,4 +19,4 @@ version.build=@build-number@
# Schema number
version.schema=1000
version.schema=1001

View File

@@ -190,7 +190,7 @@
</transition>
</decision>
<task-node name="submitpending">
<task-node name="submitpending" end-tasks="true">
<task name="wcmwf:submitpendingTask" swimlane="initiator">
<event type="task-create">
<script>

View File

@@ -52,6 +52,7 @@ import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.repo.search.impl.lucene.LuceneQueryParser;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.sandbox.SandboxConstants;
import org.alfresco.service.cmr.avm.AVMBadArgumentException;
import org.alfresco.service.cmr.avm.AVMCycleException;
import org.alfresco.service.cmr.avm.AVMException;
@@ -1963,24 +1964,25 @@ public class AVMServiceTest extends AVMServiceTestBase
*/
public void testSubmitAction() throws Exception
{
final String STAGING = "foo-staging"; // note: it is implied that the website/webproject name is the same as staging name
try
{
fService.createStore("foo-staging");
fService.createDirectory("foo-staging:/", JNDIConstants.DIR_DEFAULT_WWW);
fService.createDirectory("foo-staging:/" + JNDIConstants.DIR_DEFAULT_WWW, "a");
fService.createDirectory("foo-staging:/" + JNDIConstants.DIR_DEFAULT_WWW + "/a", "b");
fService.createDirectory("foo-staging:/" + JNDIConstants.DIR_DEFAULT_WWW + "/a/b", "c");
fService.createFile("foo-staging:/" + JNDIConstants.DIR_DEFAULT_WWW + "/a/b/c", "foo").close();
fService.createFile("foo-staging:/" + JNDIConstants.DIR_DEFAULT_WWW + "/a/b/c", "bar").close();
fService.createStore(STAGING);
fService.createDirectory(STAGING+":/", JNDIConstants.DIR_DEFAULT_WWW);
fService.createDirectory(STAGING+":/" + JNDIConstants.DIR_DEFAULT_WWW, "a");
fService.createDirectory(STAGING+":/" + JNDIConstants.DIR_DEFAULT_WWW + "/a", "b");
fService.createDirectory(STAGING+":/" + JNDIConstants.DIR_DEFAULT_WWW + "/a/b", "c");
fService.createFile(STAGING+":/" + JNDIConstants.DIR_DEFAULT_WWW + "/a/b/c", "foo").close();
fService.createFile(STAGING+":/" + JNDIConstants.DIR_DEFAULT_WWW + "/a/b/c", "bar").close();
fService.createStore("area");
fService.setStoreProperty("area", QName.createQName(null, ".website.name"), new PropertyValue(null, "foo"));
fService.createLayeredDirectory("foo-staging:/" + JNDIConstants.DIR_DEFAULT_WWW, "area:/", JNDIConstants.DIR_DEFAULT_WWW);
fService.setStoreProperty("area", SandboxConstants.PROP_WEBSITE_NAME, new PropertyValue(null, STAGING)); // note: it is implied that the website name is the same as staging name
fService.createLayeredDirectory(STAGING+":/" + JNDIConstants.DIR_DEFAULT_WWW, "area:/", JNDIConstants.DIR_DEFAULT_WWW);
fService.createFile("area:/" + JNDIConstants.DIR_DEFAULT_WWW, "figs").close();
fService.getFileOutputStream("area:/" + JNDIConstants.DIR_DEFAULT_WWW + "/a/b/c/foo").close();
fService.removeNode("area:/" + JNDIConstants.DIR_DEFAULT_WWW + "/a/b/c/bar");
List<AVMDifference> diffs = fSyncService.compare(-1, "area:/" + JNDIConstants.DIR_DEFAULT_WWW, -1, "foo-staging:/" + JNDIConstants.DIR_DEFAULT_WWW, null);
List<AVMDifference> diffs = fSyncService.compare(-1, "area:/" + JNDIConstants.DIR_DEFAULT_WWW, -1, STAGING+":/" + JNDIConstants.DIR_DEFAULT_WWW, null);
assertEquals(3, diffs.size());
assertEquals("[area:/www/a/b/c/bar[-1] > foo-staging:/www/a/b/c/bar[-1], area:/www/a/b/c/foo[-1] > foo-staging:/www/a/b/c/foo[-1], area:/www/figs[-1] > foo-staging:/www/figs[-1]]", diffs.toString());
assertEquals("[area:/www/a/b/c/bar[-1] > "+STAGING+":/www/a/b/c/bar[-1], area:/www/a/b/c/foo[-1] > "+STAGING+":/www/a/b/c/foo[-1], area:/www/figs[-1] > "+STAGING+":/www/figs[-1]]", diffs.toString());
final SimpleAVMSubmitAction action = (SimpleAVMSubmitAction) fContext.getBean("simple-avm-submit");
class TxnWork implements RetryingTransactionCallback<Object>
{
@@ -1994,7 +1996,7 @@ public class AVMServiceTest extends AVMServiceTestBase
TransactionService transactionService = (TransactionService) fContext.getBean("transactionService");
transactionService.getRetryingTransactionHelper().doInTransaction(new TxnWork());
diffs = fSyncService.compare(-1, "area:/" + JNDIConstants.DIR_DEFAULT_WWW, -1, "foo-staging:/" + JNDIConstants.DIR_DEFAULT_WWW, null);
diffs = fSyncService.compare(-1, "area:/" + JNDIConstants.DIR_DEFAULT_WWW, -1, STAGING+":/" + JNDIConstants.DIR_DEFAULT_WWW, null);
assertEquals(0, diffs.size());
}
@@ -2005,7 +2007,7 @@ public class AVMServiceTest extends AVMServiceTestBase
}
finally
{
fService.purgeStore("foo-staging");
fService.purgeStore(STAGING);
fService.purgeStore("area");
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2007 Alfresco Software Limited.
* Copyright (C) 2005-2008 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -30,6 +30,7 @@ import org.alfresco.repo.action.executer.ActionExecuterAbstractBase;
import org.alfresco.repo.avm.AVMDAOs;
import org.alfresco.repo.avm.AVMNodeConverter;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.sandbox.SandboxConstants;
import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.ParameterDefinition;
import org.alfresco.service.cmr.avm.AVMService;
@@ -37,7 +38,6 @@ import org.alfresco.service.cmr.avmsync.AVMDifference;
import org.alfresco.service.cmr.avmsync.AVMSyncException;
import org.alfresco.service.cmr.avmsync.AVMSyncService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.NameMatcher;
import org.alfresco.util.Pair;
import org.apache.commons.logging.Log;
@@ -125,17 +125,16 @@ public class SimpleAVMSubmitAction extends ActionExecuterAbstractBase
}
// Get the .website.name property.
PropertyValue wsProp =
fAVMService.getStoreProperty(storePath[0],
QName.createQName(null, ".website.name"));
fAVMService.getStoreProperty(storePath[0], SandboxConstants.PROP_WEBSITE_NAME);
if (wsProp == null)
{
fgLogger.warn(".website.name property not found.");
fgLogger.warn(SandboxConstants.PROP_WEBSITE_NAME.toString()+" property not found.");
return;
}
// And the actual web-site name.
String websiteName = wsProp.getStringValue();
// Construct the submit destination path.
String avmDest = websiteName + "-staging:" + storePath[1];
String avmDest = websiteName + ":" + storePath[1]; // note: it is implied that the website name is the same as staging name
// Get the difference between source and destination.
List<AVMDifference> diffs =
fAVMSyncService.compare(version, path, -1, avmDest, fExcluder);
@@ -146,7 +145,7 @@ public class SimpleAVMSubmitAction extends ActionExecuterAbstractBase
// Cleanup by flattening the source relative to the destination.
// This is an ugliness to prevent database write misorderings in flatten.
AVMDAOs.Instance().fAVMNodeDAO.flush();
fAVMSyncService.flatten(storePath[0] + ":/" + JNDIConstants.DIR_DEFAULT_WWW, websiteName + "-staging:/" + JNDIConstants.DIR_DEFAULT_WWW);
fAVMSyncService.flatten(storePath[0] + ":/" + JNDIConstants.DIR_DEFAULT_WWW, websiteName + ":/" + JNDIConstants.DIR_DEFAULT_WWW);
}
/**

View File

@@ -26,10 +26,10 @@ package org.alfresco.repo.avm.wf;
import java.util.List;
import org.alfresco.repo.workflow.jbpm.JBPMSpringActionHandler;
import org.alfresco.sandbox.SandboxConstants;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.avmsync.AVMDifference;
import org.alfresco.service.cmr.avmsync.AVMSyncService;
import org.alfresco.service.namespace.QName;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jbpm.graph.exe.ExecutionContext;
@@ -81,9 +81,9 @@ public class AVMSubmitHandler extends JBPMSpringActionHandler
return;
}
String webSiteName =
fAVMService.getStoreProperty(storePath[0], QName.createQName(null, ".website.name")).
fAVMService.getStoreProperty(storePath[0], SandboxConstants.PROP_WEBSITE_NAME).
getStringValue();
String avmDest = webSiteName + "-staging:" + storePath[1];
String avmDest = webSiteName + ":" + storePath[1]; // note: it is implied that the website name is the same as staging name
List<AVMDifference> diffs =
fAVMSyncService.compare(-1, avmSource, -1, avmDest, null);
// TODO fix update comments if needed.

View File

@@ -60,6 +60,8 @@ import org.alfresco.repo.search.impl.lucene.analysis.MLTokenDuplicator;
import org.alfresco.repo.search.impl.lucene.analysis.VerbatimAnalyser;
import org.alfresco.repo.search.impl.lucene.fts.FTSIndexerAware;
import org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexer;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
import org.alfresco.service.cmr.avm.AVMException;
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
@@ -1151,9 +1153,16 @@ public class AVMLuceneIndexerImpl extends AbstractLuceneIndexerImpl<String> impl
@Override
protected void doPrepare() throws IOException
{
AuthenticationUtil.runAs(new RunAsWork<String>()
{
public String doWork() throws Exception
{
saveDelta();
flushPending();
return null;
}
}, AuthenticationUtil.getSystemUserName());
}
@Override