Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

57112: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      56761: Reverse Merge: Caused lots of build errors running SecurityTestSuite. Specifically HomeFolderProviderSynchronizerTest
            which ran after AuthorityBridgeTableAsynchronouslyRefreshedCacheTest.
            See https://bamboo.alfresco.com/bamboo/browse/ALF-ENTERPRISEV42BUGFIX-7 (#11 has 30 errors including 26 from HFPST and ABTARCT)
         56562: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1)
            56138: Merged DEV to V4.1-BUG-FIX (4.1.7)
               56075: MNT-9375 (related to MNT-9485): MT - when users are added to site with a group addition versus individual, they are not handled as members of site
               Added JUnit test for the issue. Added the test to SecurityTestSuite.
         56580: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1)
            56026: Merged DEV to V4.1-BUG-FIX (4.1.7)
               55892: MNT-9485: MT Users added to Alfresco Administrators group via Group addition do not have 'admin' privileges
                - Build bridge cache on behalf of provided tenant user. 
         56581: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1)
            << last commit missed a file >>
            56026: Merged DEV to V4.1-BUG-FIX (4.1.7)
               55892: MNT-9485: MT Users added to Alfresco Administrators group via Group addition do not have 'admin' privileges
                - Build bridge cache on behalf of provided tenant user. 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61742 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-11 19:44:32 +00:00
parent 9f7031eaea
commit 4f4d6ec937
4 changed files with 7 additions and 159 deletions

View File

@@ -21,9 +21,6 @@ package org.alfresco.repo.security.authority;
import java.util.List;
import org.alfresco.repo.cache.AbstractAsynchronouslyRefreshedCache;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.tenant.TenantAdminService;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.util.BridgeTable;
@@ -38,7 +35,6 @@ public class AuthorityBridgeTableAsynchronouslyRefreshedCache extends AbstractAs
{
private AuthorityBridgeDAO authorityBridgeDAO;
private RetryingTransactionHelper retryingTransactionHelper;
private TenantAdminService tenantAdminService;
/**
* @param authorityBridgeDAO
@@ -58,29 +54,17 @@ public class AuthorityBridgeTableAsynchronouslyRefreshedCache extends AbstractAs
this.retryingTransactionHelper = retryingTransactionHelper;
}
public void setTenantAdminService(TenantAdminService tenantAdminService)
{
this.tenantAdminService = tenantAdminService;
}
@Override
protected BridgeTable<String> buildCache(final String tenantId)
{
return AuthenticationUtil.runAs(new RunAsWork<BridgeTable<String>>()
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<BridgeTable<String>>()
{
public BridgeTable<String> doWork() throws Exception
@Override
public BridgeTable<String> execute() throws Throwable
{
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<BridgeTable<String>>()
{
@Override
public BridgeTable<String> execute() throws Throwable
{
return doBuildCache(tenantId);
}
}, true, false);
return doBuildCache(tenantId);
}
}, tenantAdminService.getDomainUser(AuthenticationUtil.getSystemUserName(), tenantId));
}, true, false);
}
private BridgeTable<String> doBuildCache(String tenantId)