CCM NG/ccm-cms: Some bugfixes for the AssignedTaskTable

git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4803 8810af33-2d31-482b-a856-94f89814c4df
ccm-docs
jensp 2017-06-23 16:58:14 +00:00
parent 339507295d
commit 6759d1d2e1
1 changed files with 5 additions and 4 deletions

View File

@ -102,17 +102,18 @@ public final class AssignedTaskTable extends Table {
final int column) { final int column) {
// SF patch [ 1587168 ] Show locking user // SF patch [ 1587168 ] Show locking user
final BoxPanel panel = new BoxPanel(); final BoxPanel panel = new BoxPanel();
final User lockingUser = (User) value; final String lockingUserName = (String) value;
if (lockingUser != null) { if (lockingUserName != null) {
final StringBuilder sb = new StringBuilder("Locked by <br />"); final StringBuilder sb = new StringBuilder("Locked by <br />");
final CdiUtil cdiUtil = CdiUtil.createCdiUtil(); final CdiUtil cdiUtil = CdiUtil.createCdiUtil();
final Shiro shiro = cdiUtil.findBean(Shiro.class); final Shiro shiro = cdiUtil.findBean(Shiro.class);
if (lockingUser.equals(shiro.getUser())) { if (shiro.getUser().isPresent()
&& lockingUserName.equals(shiro.getUser().get().getName())) {
sb.append("you"); sb.append("you");
panel.add(new ControlLink(new Label( panel.add(new ControlLink(new Label(
gz("cms.ui.workflow.task.unlock")))); gz("cms.ui.workflow.task.unlock"))));
} else { } else {
sb.append(lockingUser.getName()); sb.append(lockingUserName);
panel.add(new ControlLink(new Label( panel.add(new ControlLink(new Label(
gz("cms.ui.workflow.task.takeover")))); gz("cms.ui.workflow.task.takeover"))));
} }