mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Javadoc
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6055 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -241,6 +241,14 @@ public abstract class AuthenticationUtil
|
|||||||
ContextHolder.setContext(null);
|
ContextHolder.setContext(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute a unit of work as a given user. The thread's authenticated user will be
|
||||||
|
* returned to its normal state after the call.
|
||||||
|
*
|
||||||
|
* @param runAsWork the unit of work to do
|
||||||
|
* @param uid the user ID
|
||||||
|
* @return Returns the work's return value
|
||||||
|
*/
|
||||||
public static <R> R runAs(RunAsWork<R> runAsWork, String uid)
|
public static <R> R runAs(RunAsWork<R> runAsWork, String uid)
|
||||||
{
|
{
|
||||||
String currentUser = AuthenticationUtil.getCurrentUserName();
|
String currentUser = AuthenticationUtil.getCurrentUserName();
|
||||||
|
Reference in New Issue
Block a user