mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-19924 IllegalStateException: Unauthenticated during upgrade from 3.4.X to HEAD build 1451
Run as System on bootstrap. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55144 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,8 @@ import org.alfresco.repo.importer.ImporterBootstrap;
|
|||||||
import org.alfresco.repo.node.index.FullIndexRecoveryComponent.RecoveryMode;
|
import org.alfresco.repo.node.index.FullIndexRecoveryComponent.RecoveryMode;
|
||||||
import org.alfresco.repo.search.AVMSnapShotTriggeredIndexingMethodInterceptorImpl;
|
import org.alfresco.repo.search.AVMSnapShotTriggeredIndexingMethodInterceptorImpl;
|
||||||
import org.alfresco.repo.search.IndexMode;
|
import org.alfresco.repo.search.IndexMode;
|
||||||
|
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.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||||
import org.alfresco.service.cmr.repository.ContentReader;
|
import org.alfresco.service.cmr.repository.ContentReader;
|
||||||
import org.alfresco.service.cmr.repository.ContentService;
|
import org.alfresco.service.cmr.repository.ContentService;
|
||||||
@@ -174,11 +176,17 @@ public class ConfigurationChecker extends AbstractLifecycleBean
|
|||||||
{
|
{
|
||||||
RetryingTransactionCallback<Object> checkWork = new RetryingTransactionCallback<Object>()
|
RetryingTransactionCallback<Object> checkWork = new RetryingTransactionCallback<Object>()
|
||||||
{
|
{
|
||||||
public Object execute() throws Exception
|
public Object execute() throws Throwable {
|
||||||
|
// run as System on bootstrap
|
||||||
|
return AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||||
|
{
|
||||||
|
public Object doWork()
|
||||||
{
|
{
|
||||||
check();
|
check();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}, AuthenticationUtil.getSystemUserName());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
transactionService.getRetryingTransactionHelper().doInTransaction(checkWork, true);
|
transactionService.getRetryingTransactionHelper().doInTransaction(checkWork, true);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user