Reverted 63895 (MNT-10338), which went onto the wrong branch

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@63908 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2014-03-11 12:38:58 +00:00
parent 69f2922c30
commit 7e2d1a95c6
2 changed files with 11 additions and 54 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2014 Alfresco Software Limited.
* Copyright (C) 2005-2013 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -295,18 +295,15 @@ public class RepositoryAuthenticationDao implements MutableAuthenticationDao, In
private NodeRef getUserFolderLocation(String caseSensitiveUserName)
{
// Use the tenant aware cache key
// see MNT-10338
final String cacheKey = tenantService.getUserDomain(caseSensitiveUserName) + KEY_USERFOLDER_NODEREF;
NodeRef userNodeRef = singletonCache.get(cacheKey);
NodeRef userNodeRef = singletonCache.get(KEY_USERFOLDER_NODEREF);
if (userNodeRef == null)
{
QName qnameAssocSystem = QName.createQName("sys", "system", namespacePrefixResolver);
QName qnameAssocUsers = QName.createQName("sys", "people", namespacePrefixResolver);
// Use tenant domain to get a valid storeRef
StoreRef userStoreRef = tenantService.getName(caseSensitiveUserName, new StoreRef(STOREREF_USERS.getProtocol(), STOREREF_USERS.getIdentifier()));
//StoreRef userStoreRef = tenantService.getName(caseSensitiveUserName, new StoreRef(STOREREF_USERS.getProtocol(), STOREREF_USERS.getIdentifier()));
StoreRef userStoreRef = new StoreRef(STOREREF_USERS.getProtocol(), STOREREF_USERS.getIdentifier());
// AR-527
NodeRef rootNode = nodeService.getRootNode(userStoreRef);
List<ChildAssociationRef> results = nodeService.getChildAssocs(rootNode, RegexQNamePattern.MATCH_ALL, qnameAssocSystem);
@@ -328,7 +325,7 @@ public class RepositoryAuthenticationDao implements MutableAuthenticationDao, In
{
userNodeRef = tenantService.getName(results.get(0).getChildRef());
}
singletonCache.put(cacheKey, userNodeRef);
singletonCache.put(KEY_USERFOLDER_NODEREF, userNodeRef);
}
return userNodeRef;
}