mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD:
43124: Merged BRANCHES/DEV/FEATURES/CLOUD1_DISCUSSIONS to BRANCHES/DEV/V4.1-BUG-FIX: 43059: CLOUD-864: Use base node ref, instead of tenant specific node ref for building list of replies (ALF-16498) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@43125 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -72,6 +72,26 @@ public class TenantUtil
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute a unit of work in a given tenant context. The thread's tenant context will be returned to its normal state
|
||||
* after the call.
|
||||
*
|
||||
* @param runAsWork the unit of work to do
|
||||
* @param uid the user ID
|
||||
* @param tenanDomain the tenant domain
|
||||
* @return Returns the work's return value
|
||||
*/
|
||||
public static <R> R runAsUserTenant(final TenantRunAsWork<R> runAsWork, final String uid, final String tenantDomain)
|
||||
{
|
||||
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<R>()
|
||||
{
|
||||
public R doWork()
|
||||
{
|
||||
return runAsTenant(runAsWork, tenantDomain);
|
||||
}
|
||||
}, uid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute a unit of work in a given tenant context. The thread's tenant context will be returned to its normal state
|
||||
* after the call.
|
||||
|
Reference in New Issue
Block a user