From 3497aae8a047e0119616abfdc401101274827b13 Mon Sep 17 00:00:00 2001 From: Jan Vonka Date: Fri, 4 Jul 2008 15:29:04 +0000 Subject: [PATCH] Merge V2.9 to HEAD 9366: Fix ETWONINE-1 (ALFCOM-1699) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9654 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/repo/importer/ImporterBootstrap.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/importer/ImporterBootstrap.java b/source/java/org/alfresco/repo/importer/ImporterBootstrap.java index f872885d1d..ff04373f14 100644 --- a/source/java/org/alfresco/repo/importer/ImporterBootstrap.java +++ b/source/java/org/alfresco/repo/importer/ImporterBootstrap.java @@ -304,8 +304,12 @@ public class ImporterBootstrap extends AbstractLifecycleBean PropertyCheck.mandatory(this, "importerService", importerService); PropertyCheck.mandatory(this, "storeRef", storeRef); - - Authentication authentication = authenticationComponent.setSystemUserAsCurrentUser(); + // 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 doImportCallback = new RetryingTransactionCallback() {