mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
12145: Merged V2.2 to V3.0 (AuthenticationUtil) 12109: AuthenticationUtil and AuthenticationComponent refactor 12152: Removed Lucene usage from lookup of 'sites' root folder 12153: Fix InviteServiceTest by cleaning up leaking authentications 12159: Fix for broken usage pattern of the Threadlocal values in recent AuthenticationUtil refactor. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12508 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -504,8 +504,8 @@ public class WorkflowInterpreter extends BaseInterpreter
|
||||
|
||||
if (command[2].equals("tasks"))
|
||||
{
|
||||
out.println(AuthenticationUtil.getCurrentUserName() + ":");
|
||||
List<WorkflowTask> tasks = workflowService.getAssignedTasks(AuthenticationUtil.getCurrentUserName(), WorkflowTaskState.IN_PROGRESS);
|
||||
out.println(AuthenticationUtil.getRunAsUser() + ":");
|
||||
List<WorkflowTask> tasks = workflowService.getAssignedTasks(AuthenticationUtil.getRunAsUser(), WorkflowTaskState.IN_PROGRESS);
|
||||
for (WorkflowTask task : tasks)
|
||||
{
|
||||
out.println("id: " + task.id + " , name: " + task.name + " , properties: " + task.properties.size() + " , workflow: " + task.path.instance.id + " , path: " + task.path.id);
|
||||
@@ -514,8 +514,8 @@ public class WorkflowInterpreter extends BaseInterpreter
|
||||
|
||||
else if (command[2].equals("completed"))
|
||||
{
|
||||
out.println(AuthenticationUtil.getCurrentUserName() + ":");
|
||||
List<WorkflowTask> tasks = workflowService.getAssignedTasks(AuthenticationUtil.getCurrentUserName(), WorkflowTaskState.COMPLETED);
|
||||
out.println(AuthenticationUtil.getRunAsUser() + ":");
|
||||
List<WorkflowTask> tasks = workflowService.getAssignedTasks(AuthenticationUtil.getRunAsUser(), WorkflowTaskState.COMPLETED);
|
||||
for (WorkflowTask task : tasks)
|
||||
{
|
||||
out.println("id: " + task.id + " , name " + task.name + " , properties: " + task.properties.size() + " , workflow: " + task.path.instance.id + " , path: " + task.path.id);
|
||||
@@ -524,8 +524,8 @@ public class WorkflowInterpreter extends BaseInterpreter
|
||||
|
||||
else if (command[2].equals("pooled"))
|
||||
{
|
||||
out.println(AuthenticationUtil.getCurrentUserName() + ":");
|
||||
List<WorkflowTask> tasks = workflowService.getPooledTasks(AuthenticationUtil.getCurrentUserName());
|
||||
out.println(AuthenticationUtil.getRunAsUser() + ":");
|
||||
List<WorkflowTask> tasks = workflowService.getPooledTasks(AuthenticationUtil.getRunAsUser());
|
||||
for (WorkflowTask task : tasks)
|
||||
{
|
||||
out.println("id: " + task.id + " , name " + task.name + " , properties: " + task.properties.size() + " , workflow: " + task.path.instance.id + " , path: " + task.path.id);
|
||||
|
@@ -187,6 +187,7 @@ public class AlfrescoJavaScript extends JBPMSpringActionHandler
|
||||
* @param services
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private static Object convertForJBPM(Object value, ServiceRegistry services)
|
||||
{
|
||||
if (value == null)
|
||||
@@ -255,7 +256,7 @@ public class AlfrescoJavaScript extends JBPMSpringActionHandler
|
||||
Map<String, Object> inputMap = new HashMap<String, Object>();
|
||||
|
||||
// initialise global script variables
|
||||
String userName = AuthenticationUtil.getCurrentUserName();
|
||||
String userName = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
NodeRef person = services.getPersonService().getPerson(userName);
|
||||
if (person != null)
|
||||
{
|
||||
|
@@ -670,7 +670,7 @@ public class JBPMEngine extends BPMEngine
|
||||
public Object doInJbpm(JbpmContext context)
|
||||
{
|
||||
// initialise jBPM actor (for any processes that wish to record the initiator)
|
||||
String currentUserName = AuthenticationUtil.getCurrentUserName();
|
||||
String currentUserName = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
context.setActorId(currentUserName);
|
||||
|
||||
// construct a new process
|
||||
|
@@ -114,7 +114,7 @@ public class WorkflowTaskInstance extends TaskInstance
|
||||
// Force assignment of task if transition is taken, but no owner has yet been assigned
|
||||
if (actorId == null)
|
||||
{
|
||||
actorId = AuthenticationUtil.getCurrentUserName();
|
||||
actorId = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
}
|
||||
|
||||
// Set task properties on completion of task
|
||||
|
Reference in New Issue
Block a user