From 6b5f5006e01fbdecf86c6c5bf5d65fb651de75b7 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Fri, 21 May 2021 19:25:27 +0200 Subject: [PATCH] hide hsh00- prefix in username --- web/src/main/java/de/hsadmin/web/MainToolbar.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/main/java/de/hsadmin/web/MainToolbar.java b/web/src/main/java/de/hsadmin/web/MainToolbar.java index 72e1f96..048de0a 100644 --- a/web/src/main/java/de/hsadmin/web/MainToolbar.java +++ b/web/src/main/java/de/hsadmin/web/MainToolbar.java @@ -35,7 +35,8 @@ public class MainToolbar extends CustomComponent implements ClickListener { layout.addComponent(whitespace); layout.setExpandRatio(whitespace, 1.0f); final String login = session.getUser(); - final Button profileBtn = new Button(login); + final String loginName = login.startsWith("hsh00-") ? login.substring(6) : login; + final Button profileBtn = new Button(loginName); profileBtn.setStyleName(ValoTheme.BUTTON_LINK); layout.addComponent(profileBtn); layout.setExpandRatio(profileBtn, 0.0f);