From 757616bc8525e2e8deb3946f76e518b12d4944e7 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Thu, 21 Jun 2007 16:07:19 +0000 Subject: [PATCH] Javadoc git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6055 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/security/authentication/AuthenticationUtil.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/java/org/alfresco/repo/security/authentication/AuthenticationUtil.java b/source/java/org/alfresco/repo/security/authentication/AuthenticationUtil.java index 7d581f4dee..77913b864a 100644 --- a/source/java/org/alfresco/repo/security/authentication/AuthenticationUtil.java +++ b/source/java/org/alfresco/repo/security/authentication/AuthenticationUtil.java @@ -241,6 +241,14 @@ public abstract class AuthenticationUtil 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 runAs(RunAsWork runAsWork, String uid) { String currentUser = AuthenticationUtil.getCurrentUserName();