mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
57095: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3) 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. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61724 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -21,6 +21,9 @@ 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;
|
||||
@@ -35,6 +38,7 @@ public class AuthorityBridgeTableAsynchronouslyRefreshedCache extends AbstractAs
|
||||
{
|
||||
private AuthorityBridgeDAO authorityBridgeDAO;
|
||||
private RetryingTransactionHelper retryingTransactionHelper;
|
||||
private TenantAdminService tenantAdminService;
|
||||
|
||||
/**
|
||||
* @param authorityBridgeDAO
|
||||
@@ -54,8 +58,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>>()
|
||||
{
|
||||
public BridgeTable<String> doWork() throws Exception
|
||||
{
|
||||
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<BridgeTable<String>>()
|
||||
{
|
||||
@@ -65,6 +78,9 @@ public class AuthorityBridgeTableAsynchronouslyRefreshedCache extends AbstractAs
|
||||
return doBuildCache(tenantId);
|
||||
}
|
||||
}, true, false);
|
||||
|
||||
}
|
||||
}, tenantAdminService.getDomainUser(AuthenticationUtil.getSystemUserName(), tenantId));
|
||||
}
|
||||
|
||||
private BridgeTable<String> doBuildCache(String tenantId)
|
||||
|
Reference in New Issue
Block a user