From 4bbebc0f3297f5057a3fae63c22b50561c6fc9ab Mon Sep 17 00:00:00 2001 From: Jan Vonka Date: Mon, 3 Sep 2007 14:25:44 +0000 Subject: [PATCH] Fix for tenant-specific WebClient (fix for r6645) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6667 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/web/bean/repository/Repository.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/java/org/alfresco/web/bean/repository/Repository.java b/source/java/org/alfresco/web/bean/repository/Repository.java index fd1b729afc..138f06073d 100644 --- a/source/java/org/alfresco/web/bean/repository/Repository.java +++ b/source/java/org/alfresco/web/bean/repository/Repository.java @@ -133,6 +133,8 @@ public final class Repository */ public static NodeRef getCompanyRoot(final FacesContext context) { + final String currentUserName = Application.getCurrentUser(context).getUserName(); + // note: run in context of System user using tenant-specific store // so that Company Root can be returned, even if the user does not have // permission to access the Company Root (including, for example, the Guest user) @@ -145,7 +147,7 @@ public final class Repository TenantService tenantService = (TenantService)FacesContextUtils.getRequiredWebApplicationContext(context).getBean("tenantService"); // get store ref (from config) - StoreRef storeRef = tenantService.getName(Repository.getStoreRef()); + StoreRef storeRef = tenantService.getName(currentUserName, Repository.getStoreRef()); // get root path (from config) String rootPath = Application.getRootPath(context);