Humongous merge. It is incomplete, however; faces-config-navigation.xml and ClientConfigElement

were both beyond me, and are just the raw conflict merge data.  If Kev can't figure out how they should
go together by tomorrow AM (for me) I'll dig back in.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4306 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-11-08 05:17:40 +00:00
parent c5c18185cf
commit 99486032e1
46 changed files with 5805 additions and 3529 deletions

View File

@@ -21,7 +21,6 @@ import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.workflow.WorkflowService;
import org.alfresco.service.cmr.workflow.WorkflowTask;
import org.alfresco.util.ISO9075;
import org.alfresco.web.action.ActionEvaluator;
@@ -45,37 +44,28 @@ public class CancelWorkflowEvaluator implements ActionEvaluator
public boolean evaluate(Node node)
{
boolean result = false;
// get the id of the task
String taskId = (String)node.getProperties().get("id");
if (taskId != null)
FacesContext context = FacesContext.getCurrentInstance();
// get the task from the node
WorkflowTask task = (WorkflowTask)node.getProperties().get("workflowTask");
if (task != null)
{
FacesContext context = FacesContext.getCurrentInstance();
// get the initiator of the workflow the task belongs to
WorkflowService workflowSvc = Repository.getServiceRegistry(
context).getWorkflowService();
WorkflowTask task = workflowSvc.getTaskById(taskId);
if (task != null)
NodeRef initiator = task.path.instance.initiator;
if (initiator != null)
{
NodeRef initiator = task.path.instance.initiator;
if (initiator != null)
// find the current username
User user = Application.getCurrentUser(context);
String currentUserName = ISO9075.encode(user.getUserName());
// get the username of the initiator
NodeService nodeSvc = Repository.getServiceRegistry(
context).getNodeService();
String userName = (String)nodeSvc.getProperty(initiator, ContentModel.PROP_USERNAME);
// if the current user started the workflow allow the cancel action
if (currentUserName.equals(userName))
{
// find the current username
User user = Application.getCurrentUser(context);
String currentUserName = ISO9075.encode(user.getUserName());
// get the username of the initiator
NodeService nodeSvc = Repository.getServiceRegistry(
context).getNodeService();
String userName = (String)nodeSvc.getProperty(initiator, ContentModel.PROP_USERNAME);
// if the current user started the workflow allow the cancel action
if (currentUserName.equals(userName))
{
result = true;
}
result = true;
}
}
}