mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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
This commit is contained in:
@@ -133,6 +133,8 @@ public final class Repository
|
|||||||
*/
|
*/
|
||||||
public static NodeRef getCompanyRoot(final FacesContext context)
|
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
|
// 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
|
// 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)
|
// 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");
|
TenantService tenantService = (TenantService)FacesContextUtils.getRequiredWebApplicationContext(context).getBean("tenantService");
|
||||||
|
|
||||||
// get store ref (from config)
|
// get store ref (from config)
|
||||||
StoreRef storeRef = tenantService.getName(Repository.getStoreRef());
|
StoreRef storeRef = tenantService.getName(currentUserName, Repository.getStoreRef());
|
||||||
|
|
||||||
// get root path (from config)
|
// get root path (from config)
|
||||||
String rootPath = Application.getRootPath(context);
|
String rootPath = Application.getRootPath(context);
|
||||||
|
Reference in New Issue
Block a user