Author: heiko.braun(a)jboss.com
Date: 2009-07-27 13:31:08 -0400 (Mon, 27 Jul 2009)
New Revision: 5346
Modified:
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/FormProcessingFacade.java
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/UserMgmtFacade.java
projects/gwt-console/trunk/server/server-core/src/main/webapp/WEB-INF/web.xml
Log:
Fix JBPM-2454: Resolve principal
Modified:
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/FormProcessingFacade.java
===================================================================
---
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/FormProcessingFacade.java 2009-07-27
07:30:28 UTC (rev 5345)
+++
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/FormProcessingFacade.java 2009-07-27
17:31:08 UTC (rev 5346)
@@ -150,7 +150,7 @@
Long.valueOf(taskId), // TODO: change to string id's
String.valueOf(processVars.get("outcome")), // actually a plugin
implementation detail
processVars,
- request.getRemoteUser()
+ request.getUserPrincipal().getName()
);
return Response.ok("Successfully processed input").build();
Modified:
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java
===================================================================
---
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java 2009-07-27
07:30:28 UTC (rev 5345)
+++
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/TaskMgmtFacade.java 2009-07-27
17:31:08 UTC (rev 5346)
@@ -94,7 +94,7 @@
)
{
log.debug("Assign task " + taskId + " to '" + idRef
+"'");
- getTaskManagement().assignTask(taskId, idRef, request.getRemoteUser());
+ getTaskManagement().assignTask(taskId, idRef, request.getUserPrincipal().getName());
return Response.ok().build();
}
@@ -109,7 +109,7 @@
)
{
log.debug("Release task " + taskId);
- getTaskManagement().assignTask(taskId, null, request.getRemoteUser());
+ getTaskManagement().assignTask(taskId, null, request.getUserPrincipal().getName());
return Response.ok().build();
}
@@ -124,7 +124,7 @@
)
{
log.debug("Close task " + taskId );
- getTaskManagement().completeTask(taskId, null, request.getRemoteUser());
+ getTaskManagement().completeTask(taskId, null,
request.getUserPrincipal().getName());
return Response.ok().build();
}
@@ -141,7 +141,7 @@
)
{
log.debug("Close task " + taskId + " outcome " + outcome);
- getTaskManagement().completeTask(taskId, outcome, null, request.getRemoteUser());
+ getTaskManagement().completeTask(taskId, outcome, null,
request.getUserPrincipal().getName());
return Response.ok().build();
}
Modified:
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/UserMgmtFacade.java
===================================================================
---
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/UserMgmtFacade.java 2009-07-27
07:30:28 UTC (rev 5345)
+++
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/UserMgmtFacade.java 2009-07-27
17:31:08 UTC (rev 5346)
@@ -80,7 +80,7 @@
if(null==roleCheck)
throw new WebApplicationException( new IllegalArgumentException("Missing
parameter 'roleCheck'") );
- log.debug("Role check user: " + request.getRemoteUser() + ",
actualRoles requested: " + roleCheck);
+ log.debug("Role check user: " + request.getUserPrincipal().getName() +
", actualRoles requested: " + roleCheck);
List<RoleAssignmentRef> actualRoles = new
ArrayList<RoleAssignmentRef>();
Modified: projects/gwt-console/trunk/server/server-core/src/main/webapp/WEB-INF/web.xml
===================================================================
---
projects/gwt-console/trunk/server/server-core/src/main/webapp/WEB-INF/web.xml 2009-07-27
07:30:28 UTC (rev 5345)
+++
projects/gwt-console/trunk/server/server-core/src/main/webapp/WEB-INF/web.xml 2009-07-27
17:31:08 UTC (rev 5346)
@@ -51,7 +51,8 @@
<web-resource-collection>
<web-resource-name>Resteasy</web-resource-name>
<url-pattern>/rs/process/*</url-pattern>
- <!--url-pattern>/rs/task/*</url-pattern
https://jira.jboss.org/jira/browse/JBPM-2229 -->
+ <url-pattern>/rs/task/*</url-pattern>
+ <!--url-pattern>/rs/form/*</url-pattern
https://jira.jboss.org/jira/browse/JBPM-2229-->
<url-pattern>/rs/tasks/*</url-pattern>
<url-pattern>/rs/identity/*</url-pattern>
</web-resource-collection>