- // String username = SecurityContextHolder.getContext()
- // .getAuthentication().getName();
- String username = CurrentUserUtils.getUsername();
- if (username.equalsIgnoreCase(KernelHeader.ROLE_ANONYMOUS))
+ String username = CurrentUser.getUsername(CmsUtils.getCmsView()
+ .getSubject());
+ if (username.equalsIgnoreCase(AuthConstants.ROLE_ANONYMOUS))