CCM NG/ccm-cms: Some bugfixes for the AssignedTaskTable
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4803 8810af33-2d31-482b-a856-94f89814c4dfccm-docs
parent
339507295d
commit
6759d1d2e1
|
|
@ -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"))));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue